Make DIV_ROUND_UP macro globally available
Signed-off-by: Juergen Beisert <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
b08d7dfecf
commit
f9a11ecfef
|
@ -244,8 +244,7 @@ unsigned imx_set_sspclk(unsigned index, unsigned nc, int high)
|
|||
printf("Cannot setup SSP unit clock to %u Hz, base clock is only %u Hz\n", nc, ssp_div);
|
||||
ssp_div = 1U;
|
||||
} else {
|
||||
ssp_div += nc - 1U;
|
||||
ssp_div /= nc;
|
||||
ssp_div = DIV_ROUND_UP(ssp_div, nc);
|
||||
if (ssp_div > CLKCTRL_SSP_DIV_MASK)
|
||||
ssp_div = CLKCTRL_SSP_DIV_MASK;
|
||||
}
|
||||
|
|
|
@ -224,9 +224,6 @@ static unsigned int cspi_2_3_xchg_single(struct imx_spi *imx, unsigned int data)
|
|||
return readl(base + CSPI_2_3_RXDATA);
|
||||
}
|
||||
|
||||
/* FIXME: include/linux/kernel.h */
|
||||
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
|
||||
|
||||
static unsigned int cspi_2_3_clkdiv(unsigned int fin, unsigned int fspi)
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -222,4 +222,6 @@ extern const char version_string[];
|
|||
|
||||
#define IOMEM(addr) ((void __force __iomem *)(addr))
|
||||
|
||||
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
|
||||
|
||||
#endif /* __COMMON_H_ */
|
||||
|
|
Loading…
Reference in New Issue