From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mr. goldenstreet Date: Tue, 8 May 2018 23:46:18 -0700 (MST) Subject: [U-Boot] should there be general setbits function? Message-ID: <1525848378882-0.post@n7.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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/