Fix chip/sam_tc.c:682:24: error: unused function 'sam_tc_getreg'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-11-19 12:52:11 +08:00 committed by Petro Karashchenko
parent d01fbf77d0
commit 22768ede17
2 changed files with 0 additions and 81 deletions

View File

@ -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
*

View File

@ -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
*