From 22768ede1709e8b0f5a992c813b255396b1dec62 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 19 Nov 2022 12:52:11 +0800 Subject: [PATCH] Fix chip/sam_tc.c:682:24: error: unused function 'sam_tc_getreg' Signed-off-by: Xiang Xiao --- arch/arm/src/sama5/sam_tc.c | 54 ------------------------------------- arch/arm/src/samv7/sam_tc.c | 27 ------------------- 2 files changed, 81 deletions(-) diff --git a/arch/arm/src/sama5/sam_tc.c b/arch/arm/src/sama5/sam_tc.c index 31a3ad9406..8ac403f23a 100644 --- a/arch/arm/src/sama5/sam_tc.c +++ b/arch/arm/src/sama5/sam_tc.c @@ -157,11 +157,6 @@ static bool sam_checkreg(struct sam_tc_s *tc, bool wr, uint32_t regaddr, # define sam_checkreg(tc,wr,regaddr,regval) (false) #endif -static inline uint32_t sam_tc_getreg(struct sam_chan_s *chan, - unsigned int offset); -static inline void sam_tc_putreg(struct sam_chan_s *chan, - unsigned int offset, uint32_t regval); - static inline uint32_t sam_chan_getreg(struct sam_chan_s *chan, unsigned int offset); static inline void sam_chan_putreg(struct sam_chan_s *chan, @@ -566,55 +561,6 @@ static bool sam_checkreg(struct sam_tc_s *tc, bool wr, uint32_t regaddr, } #endif -/**************************************************************************** - * Name: sam_tc_getreg - * - * Description: - * Read an TC register - * - ****************************************************************************/ - -static inline uint32_t sam_tc_getreg(struct sam_chan_s *chan, - unsigned int offset) -{ - struct sam_tc_s *tc = chan->tc; - uint32_t regaddr = tc->base + offset; - uint32_t regval = getreg32(regaddr); - -#ifdef CONFIG_SAMA5_TC_REGDEBUG - if (sam_checkreg(tc, false, regaddr, regval)) - { - tmrinfo("%08x->%08x\n", regaddr, regval); - } -#endif - - return regval; -} - -/**************************************************************************** - * Name: sam_tc_putreg - * - * Description: - * Write a value to an TC register - * - ****************************************************************************/ - -static inline void sam_tc_putreg(struct sam_chan_s *chan, uint32_t regval, - unsigned int offset) -{ - struct sam_tc_s *tc = chan->tc; - uint32_t regaddr = tc->base + offset; - -#ifdef CONFIG_SAMA5_TC_REGDEBUG - if (sam_checkreg(tc, true, regaddr, regval)) - { - tmrinfo("%08x<-%08x\n", regaddr, regval); - } -#endif - - putreg32(regval, regaddr); -} - /**************************************************************************** * Name: sam_chan_getreg * diff --git a/arch/arm/src/samv7/sam_tc.c b/arch/arm/src/samv7/sam_tc.c index ca06910078..30bf27614f 100644 --- a/arch/arm/src/samv7/sam_tc.c +++ b/arch/arm/src/samv7/sam_tc.c @@ -164,8 +164,6 @@ static bool sam_checkreg(struct sam_tc_s *tc, bool wr, uint32_t regaddr, # define sam_checkreg(tc,wr,regaddr,regval) (false) #endif -static inline uint32_t sam_tc_getreg(struct sam_chan_s *chan, - unsigned int offset); static inline void sam_tc_putreg(struct sam_chan_s *chan, unsigned int offset, uint32_t regval); @@ -680,31 +678,6 @@ static bool sam_checkreg(struct sam_tc_s *tc, bool wr, uint32_t regaddr, } #endif -/**************************************************************************** - * Name: sam_tc_getreg - * - * Description: - * Read an TC register - * - ****************************************************************************/ - -static inline uint32_t sam_tc_getreg(struct sam_chan_s *chan, - unsigned int offset) -{ - struct sam_tc_s *tc = chan->tc; - uint32_t regaddr = tc->base + offset; - uint32_t regval = getreg32(regaddr); - -#ifdef CONFIG_SAMV7_TC_REGDEBUG - if (sam_checkreg(tc, false, regaddr, regval)) - { - tmrinfo("%08x->%08x\n", regaddr, regval); - } -#endif - - return regval; -} - /**************************************************************************** * Name: sam_tc_putreg *