diff --git a/arch/arm64/src/a527/CMakeLists.txt b/arch/arm64/src/a527/CMakeLists.txt index b3f842d71a9..c747f539b5b 100644 --- a/arch/arm64/src/a527/CMakeLists.txt +++ b/arch/arm64/src/a527/CMakeLists.txt @@ -19,7 +19,7 @@ # the License. # # ############################################################################## -set(SRCS a527_boot.c a527_serial.c a527_timer.c) +set(SRCS a527_boot.c a527_serial.c) if(CONFIG_ARCH_EARLY_PRINT) list(APPEND SRCS a527_lowputc.S) diff --git a/arch/arm64/src/a527/Make.defs b/arch/arm64/src/a527/Make.defs index ae145702018..188ae327a01 100644 --- a/arch/arm64/src/a527/Make.defs +++ b/arch/arm64/src/a527/Make.defs @@ -23,7 +23,7 @@ include common/Make.defs # C Source Files specific to SoC -CHIP_CSRCS = a527_boot.c a527_serial.c a527_timer.c +CHIP_CSRCS = a527_boot.c a527_serial.c ifeq ($(CONFIG_ARCH_EARLY_PRINT),y) CHIP_ASRCS = a527_lowputc.S diff --git a/arch/arm64/src/a527/a527_timer.c b/arch/arm64/src/a527/a527_timer.c deleted file mode 100644 index 93550cade80..00000000000 --- a/arch/arm64/src/a527/a527_timer.c +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/a527/a527_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} diff --git a/arch/arm64/src/a64/Make.defs b/arch/arm64/src/a64/Make.defs index d704f150354..ad87bcf71b2 100644 --- a/arch/arm64/src/a64/Make.defs +++ b/arch/arm64/src/a64/Make.defs @@ -23,7 +23,7 @@ include common/Make.defs # Allwinner A64 specific C source files -CHIP_CSRCS = a64_boot.c a64_pio.c a64_serial.c a64_twi.c a64_timer.c +CHIP_CSRCS = a64_boot.c a64_pio.c a64_serial.c a64_twi.c ifeq ($(CONFIG_A64_DE),y) CHIP_CSRCS += a64_de.c diff --git a/arch/arm64/src/a64/a64_timer.c b/arch/arm64/src/a64/a64_timer.c deleted file mode 100644 index 9507a977739..00000000000 --- a/arch/arm64/src/a64/a64_timer.c +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/a64/a64_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} - -void arm64_timer_secondary_init(void) -{ - arm64_oneshot_secondary_init(); -} diff --git a/arch/arm64/src/bcm2711/CMakeLists.txt b/arch/arm64/src/bcm2711/CMakeLists.txt index d8811d477a0..00c021def9e 100644 --- a/arch/arm64/src/bcm2711/CMakeLists.txt +++ b/arch/arm64/src/bcm2711/CMakeLists.txt @@ -20,8 +20,7 @@ # BCM2711 specific C source files -set(SRCS bcm2711_boot.c bcm2711_mailbox.c bcm2711_serial.c bcm2711_gpio.c - bcm2711_timer.c) +set(SRCS bcm2711_boot.c bcm2711_mailbox.c bcm2711_serial.c bcm2711_gpio.c) # Early boot logging diff --git a/arch/arm64/src/bcm2711/Make.defs b/arch/arm64/src/bcm2711/Make.defs index 4a7b5855eb7..b1e8e2608d7 100644 --- a/arch/arm64/src/bcm2711/Make.defs +++ b/arch/arm64/src/bcm2711/Make.defs @@ -26,7 +26,6 @@ CHIP_CSRCS += bcm2711_boot.c CHIP_CSRCS += bcm2711_mailbox.c CHIP_CSRCS += bcm2711_serial.c CHIP_CSRCS += bcm2711_gpio.c -CHIP_CSRCS += bcm2711_timer.c # Early boot logging diff --git a/arch/arm64/src/bcm2711/bcm2711_timer.c b/arch/arm64/src/bcm2711/bcm2711_timer.c deleted file mode 100644 index 6759d6f64ef..00000000000 --- a/arch/arm64/src/bcm2711/bcm2711_timer.c +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/bcm2711/bcm2711_timer.c - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} - -void arm64_timer_secondary_init(void) -{ - arm64_oneshot_secondary_init(); -} diff --git a/arch/arm64/src/common/arm64_arch_timer.c b/arch/arm64/src/common/arm64_arch_timer.c index 8a60e23115b..3aac9b1615f 100644 --- a/arch/arm64/src/common/arm64_arch_timer.c +++ b/arch/arm64/src/common/arm64_arch_timer.c @@ -79,7 +79,7 @@ struct arm64_oneshot_lowerhalf_s }; /**************************************************************************** - * Private Functions + * Inline Functions ****************************************************************************/ static inline void arm64_arch_timer_set_compare(uint64_t value) @@ -172,6 +172,10 @@ static inline uint64_t arm64_arch_tick2cnt(uint64_t ticks, uint64_t freq) return count; } +/**************************************************************************** + * Private Functions + ****************************************************************************/ + /**************************************************************************** * Name: arm64_arch_timer_compare_isr * @@ -357,6 +361,28 @@ static int arm64_tick_current(struct oneshot_lowerhalf_s *lower, return OK; } +/**************************************************************************** + * Name: arm64_oneshot_initialize_per_cpu + * + * Description: + * Initialize the ARM generic timer for secondary CPUs. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void arm64_oneshot_initialize_per_cpu(void) +{ + /* Enable int */ + + up_enable_irq(ARM_ARCH_TIMER_IRQ); + + /* Start timer */ + + arm64_arch_timer_enable(true); +} + /**************************************************************************** * Private Data ****************************************************************************/ @@ -415,31 +441,19 @@ struct oneshot_lowerhalf_s *arm64_oneshot_initialize(void) irq_attach(ARM_ARCH_TIMER_IRQ, arm64_arch_timer_compare_isr, priv); - arm64_oneshot_secondary_init(); + arm64_oneshot_initialize_per_cpu(); tmrinfo("oneshot_initialize ok %p \n", &priv->lh); return &priv->lh; } -/**************************************************************************** - * Name: arm64_arch_timer_secondary_init - * - * Description: - * Initialize the ARM generic timer for secondary CPUs. - * - * Returned Value: - * None - * - ****************************************************************************/ - -void arm64_oneshot_secondary_init(void) +void up_timer_initialize(void) { - /* Enable int */ - - up_enable_irq(ARM_ARCH_TIMER_IRQ); - - /* Start timer */ - - arm64_arch_timer_enable(true); + up_alarm_set_lowerhalf(arm64_oneshot_initialize()); +} + +void arm64_timer_secondary_init(void) +{ + arm64_oneshot_initialize_per_cpu(); } diff --git a/arch/arm64/src/common/arm64_arch_timer.h b/arch/arm64/src/common/arm64_arch_timer.h index fd91d820ab5..0cfa433db96 100644 --- a/arch/arm64/src/common/arm64_arch_timer.h +++ b/arch/arm64/src/common/arm64_arch_timer.h @@ -34,6 +34,7 @@ * Public Function Prototypes ****************************************************************************/ +#ifdef CONFIG_ONESHOT /**************************************************************************** * Name: arm64_oneshot_initialize * @@ -48,18 +49,6 @@ ****************************************************************************/ struct oneshot_lowerhalf_s *arm64_oneshot_initialize(void); - -/**************************************************************************** - * Name: arm64_oneshot_secondary_init - * - * Description: - * Initialize the ARM generic timer for secondary CPUs. - * - * Returned Value: - * None - * - ****************************************************************************/ - -void arm64_oneshot_secondary_init(void); +#endif #endif /* __ARCH_ARM64_SRC_COMMON_ARM64_ARCH_TIMER_H */ diff --git a/arch/arm64/src/fvp-v8r/CMakeLists.txt b/arch/arm64/src/fvp-v8r/CMakeLists.txt index 8e41c388631..ead2d4f3063 100644 --- a/arch/arm64/src/fvp-v8r/CMakeLists.txt +++ b/arch/arm64/src/fvp-v8r/CMakeLists.txt @@ -17,7 +17,7 @@ # the License. # # ############################################################################## -set(SRCS fvp_boot.c fvp_serial.c fvp_timer.c) +set(SRCS fvp_boot.c fvp_serial.c) if(CONFIG_ARCH_EARLY_PRINT) list(APPEND SRCS fvp_lowputc.S) diff --git a/arch/arm64/src/fvp-v8r/Make.defs b/arch/arm64/src/fvp-v8r/Make.defs index b7895e40a5c..b40eac0e015 100644 --- a/arch/arm64/src/fvp-v8r/Make.defs +++ b/arch/arm64/src/fvp-v8r/Make.defs @@ -23,7 +23,7 @@ include common/Make.defs # fvp-specific C source files -CHIP_CSRCS = fvp_boot.c fvp_serial.c fvp_timer.c +CHIP_CSRCS = fvp_boot.c fvp_serial.c ifeq ($(CONFIG_ARCH_EARLY_PRINT),y) CHIP_ASRCS += fvp_lowputc.S diff --git a/arch/arm64/src/fvp-v8r/fvp_timer.c b/arch/arm64/src/fvp-v8r/fvp_timer.c deleted file mode 100644 index 7076a4ec381..00000000000 --- a/arch/arm64/src/fvp-v8r/fvp_timer.c +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/fvp-v8r/fvp_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} - -void arm64_timer_secondary_init(void) -{ - arm64_oneshot_secondary_init(); -} diff --git a/arch/arm64/src/goldfish/CMakeLists.txt b/arch/arm64/src/goldfish/CMakeLists.txt index 0be4eddb20b..ebe56f02e54 100644 --- a/arch/arm64/src/goldfish/CMakeLists.txt +++ b/arch/arm64/src/goldfish/CMakeLists.txt @@ -19,7 +19,7 @@ # the License. # # ############################################################################## -set(SRCS goldfish_boot.c goldfish_serial.c goldfish_timer.c) +set(SRCS goldfish_boot.c goldfish_serial.c) if(CONFIG_RTC_PL031) list(APPEND SRCS goldfish_rtc.c) diff --git a/arch/arm64/src/goldfish/Make.defs b/arch/arm64/src/goldfish/Make.defs index 78e5bfcf644..2d864dbf444 100644 --- a/arch/arm64/src/goldfish/Make.defs +++ b/arch/arm64/src/goldfish/Make.defs @@ -23,7 +23,7 @@ include common/Make.defs # qemu-specific C source files -CHIP_CSRCS = goldfish_boot.c goldfish_serial.c goldfish_timer.c +CHIP_CSRCS = goldfish_boot.c goldfish_serial.c ifeq ($(CONFIG_RTC_PL031),y) CHIP_CSRCS += goldfish_rtc.c diff --git a/arch/arm64/src/goldfish/goldfish_timer.c b/arch/arm64/src/goldfish/goldfish_timer.c deleted file mode 100644 index 2b6b9904f57..00000000000 --- a/arch/arm64/src/goldfish/goldfish_timer.c +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/goldfish/goldfish_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} - -void arm64_timer_secondary_init(void) -{ - arm64_oneshot_secondary_init(); -} diff --git a/arch/arm64/src/imx8/Make.defs b/arch/arm64/src/imx8/Make.defs index aa1dd40c600..725bec07afc 100644 --- a/arch/arm64/src/imx8/Make.defs +++ b/arch/arm64/src/imx8/Make.defs @@ -24,7 +24,7 @@ include common/Make.defs # i.MX8-specific C source files -CHIP_CSRCS = imx8_boot.c imx8_timer.c +CHIP_CSRCS = imx8_boot.c ifeq ($(CONFIG_ARCH_CHIP_IMX8_QUADMAX),y) CHIP_CSRCS += imx8qm_serial.c diff --git a/arch/arm64/src/imx8/imx8_timer.c b/arch/arm64/src/imx8/imx8_timer.c deleted file mode 100644 index 2dcd4549774..00000000000 --- a/arch/arm64/src/imx8/imx8_timer.c +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/imx8/imx8_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} - -void arm64_timer_secondary_init(void) -{ - arm64_oneshot_secondary_init(); -} diff --git a/arch/arm64/src/imx9/Make.defs b/arch/arm64/src/imx9/Make.defs index 905fb00e0f6..c8eab0dbd42 100644 --- a/arch/arm64/src/imx9/Make.defs +++ b/arch/arm64/src/imx9/Make.defs @@ -28,7 +28,7 @@ endif # i.MX9-specific C source files -CHIP_CSRCS = imx9_boot.c imx9_timer.c +CHIP_CSRCS = imx9_boot.c ifeq ($(CONFIG_ARCH_CHIP_IMX93),y) CHIP_CSRCS += imx9_ccm.c imx9_gpio.c diff --git a/arch/arm64/src/imx9/imx9_timer.c b/arch/arm64/src/imx9/imx9_timer.c deleted file mode 100644 index 25458ab164c..00000000000 --- a/arch/arm64/src/imx9/imx9_timer.c +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/imx9/imx9_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} - -void arm64_timer_secondary_init(void) -{ - arm64_oneshot_secondary_init(); -} diff --git a/arch/arm64/src/qemu/CMakeLists.txt b/arch/arm64/src/qemu/CMakeLists.txt index d48708feae7..141673930a1 100644 --- a/arch/arm64/src/qemu/CMakeLists.txt +++ b/arch/arm64/src/qemu/CMakeLists.txt @@ -19,7 +19,7 @@ # the License. # # ############################################################################## -set(SRCS qemu_boot.c qemu_serial.c qemu_timer.c) +set(SRCS qemu_boot.c qemu_serial.c) if(CONFIG_ARCH_EARLY_PRINT) list(APPEND SRCS qemu_lowputc.S) diff --git a/arch/arm64/src/qemu/Make.defs b/arch/arm64/src/qemu/Make.defs index 8c24aeb5828..409b59d9e3f 100644 --- a/arch/arm64/src/qemu/Make.defs +++ b/arch/arm64/src/qemu/Make.defs @@ -25,8 +25,6 @@ include common/Make.defs # qemu-specific C source files CHIP_CSRCS = qemu_boot.c qemu_serial.c -CHIP_CSRCS += qemu_timer.c - ifeq ($(CONFIG_ARCH_EARLY_PRINT),y) CHIP_ASRCS = qemu_lowputc.S endif diff --git a/arch/arm64/src/qemu/qemu_timer.c b/arch/arm64/src/qemu/qemu_timer.c deleted file mode 100644 index d663fec8003..00000000000 --- a/arch/arm64/src/qemu/qemu_timer.c +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/qemu/qemu_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} - -void arm64_timer_secondary_init(void) -{ - arm64_oneshot_secondary_init(); -} diff --git a/arch/arm64/src/rk3399/Make.defs b/arch/arm64/src/rk3399/Make.defs index cc2f25c109e..138f4bd0d80 100644 --- a/arch/arm64/src/rk3399/Make.defs +++ b/arch/arm64/src/rk3399/Make.defs @@ -23,7 +23,7 @@ include common/Make.defs # Rockchip RK3399 specific C source files -CHIP_CSRCS = rk3399_boot.c rk3399_serial.c rk3399_timer.c +CHIP_CSRCS = rk3399_boot.c rk3399_serial.c ifeq ($(CONFIG_ARCH_EARLY_PRINT),y) CHIP_ASRCS = rk3399_lowputc.S diff --git a/arch/arm64/src/rk3399/rk3399_timer.c b/arch/arm64/src/rk3399/rk3399_timer.c deleted file mode 100644 index 29df447af2b..00000000000 --- a/arch/arm64/src/rk3399/rk3399_timer.c +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/rk3399/rk3399_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} - -void arm64_timer_secondary_init(void) -{ - arm64_oneshot_secondary_init(); -} diff --git a/arch/arm64/src/zynq-mpsoc/Make.defs b/arch/arm64/src/zynq-mpsoc/Make.defs index cce3f7c6831..b8781325ae2 100644 --- a/arch/arm64/src/zynq-mpsoc/Make.defs +++ b/arch/arm64/src/zynq-mpsoc/Make.defs @@ -23,7 +23,7 @@ include common/Make.defs # Rockchip zynq mpsoc specific C source files -CHIP_CSRCS = zynq_boot.c zynq_serial.c zynq_mio.c zynq_timer.c zynq_pll.c +CHIP_CSRCS = zynq_boot.c zynq_serial.c zynq_mio.c zynq_pll.c ifeq ($(CONFIG_ARCH_EARLY_PRINT),y) CHIP_ASRCS = zynq_lowputc.S diff --git a/arch/arm64/src/zynq-mpsoc/zynq_timer.c b/arch/arm64/src/zynq-mpsoc/zynq_timer.c deleted file mode 100644 index f6296734758..00000000000 --- a/arch/arm64/src/zynq-mpsoc/zynq_timer.c +++ /dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** - * arch/arm64/src/zynq-mpsoc/zynq_timer.c - * - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "arm64_arch_timer.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -void up_timer_initialize(void) -{ - up_alarm_set_lowerhalf(arm64_oneshot_initialize()); -} - -void arm64_timer_secondary_init(void) -{ - arm64_oneshot_secondary_init(); -}