* [U-Boot] should there be general setbits function?
@ 2018-05-09 6:46 Mr. goldenstreet
0 siblings, 0 replies; only message in thread
From: Mr. goldenstreet @ 2018-05-09 6:46 UTC (permalink / raw)
To: u-boot
hey,
in some parts of the code set bits operations on registers are implemented
like this:
writel(readl(register) | CONSTANT, register)
i know there are setbits_be/setbits_le functions in io.h, so why isn't there
a general setbits function which checks your architecture and decides which
one of the two to use?
example(/drivers/net/designware.c):
BEFORE:
(line 281)writel(readl(&dma_p->busmode) | DMAMAC_SRST, &dma_p->busmode);
AFTER:
(line 281)setbits(&dma_p->busmode, DMAMAC_SRST)
would really appreciate an answer, thanks :)
--
Sent from: http://u-boot.10912.n7.nabble.com/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-05-09 6:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-09 6:46 [U-Boot] should there be general setbits function? Mr. goldenstreet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox