Change all clrsetbits_leXX() to clrsetbitsXX()

This patch changes all existing instances of clrsetbits_leXX() to the
new endian-independent clrsetbitsXX(), after double-checking that
they're all in SoC-specific code operating on CPU registers and not
actually trying to make an endian conversion.

This patch was created by running

 sed -i -e 's/\([cs][le][rt]bits\)_le\([136][624]\)/\1\2/g'

across the codebase and cleaning up formatting a bit.

Change-Id: I7fc3e736e5fe927da8960fdcd2aae607b62b5ff4
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37433
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
This commit is contained in:
Julius Werner
2019-12-02 22:03:27 -08:00
committed by Patrick Georgi
parent 1c37157218
commit 55009af42c
108 changed files with 2022 additions and 2025 deletions

View File

@ -140,7 +140,7 @@ static void chipidea_halt_ep(struct usbdev_ctrl *this, int ep, int in_dir)
writel(1 << ep_to_bits(ep, in_dir), &p->opreg->epflush);
while (readl(&p->opreg->epflush))
;
clrbits_le32(&p->opreg->epctrl[ep], 1 << (7 + (in_dir ? 16 : 0)));
clrbits32(&p->opreg->epctrl[ep], 1 << (7 + (in_dir ? 16 : 0)));
while (!SIMPLEQ_EMPTY(&p->job_queue[ep][in_dir])) {
struct job *job = SIMPLEQ_FIRST(&p->job_queue[ep][in_dir]);
@ -161,7 +161,7 @@ static void chipidea_start_ep(struct usbdev_ctrl *this,
in_dir = in_dir ? 1 : 0;
debug("enabling %d-%d (type %d)\n", ep, in_dir, ep_type);
/* enable endpoint, reset data toggle */
setbits_le32(&p->opreg->epctrl[ep],
setbits32(&p->opreg->epctrl[ep],
((1 << 7) | (1 << 6) | (ep_type << 2)) << (in_dir*16));
p->ep_busy[ep][in_dir] = 0;
this->ep_mps[ep][in_dir] = mps;
@ -456,17 +456,17 @@ static void chipidea_stall(struct usbdev_ctrl *this,
in_dir = in_dir ? 1 : 0;
if (set) {
if (in_dir)
setbits_le32(ctrl, 1 << 16);
setbits32(ctrl, 1 << 16);
else
setbits_le32(ctrl, 1 << 0);
setbits32(ctrl, 1 << 0);
} else {
/* reset STALL bit, reset data toggle */
if (in_dir) {
setbits_le32(ctrl, 1 << 22);
clrbits_le32(ctrl, 1 << 16);
setbits32(ctrl, 1 << 22);
clrbits32(ctrl, 1 << 16);
} else {
setbits_le32(ctrl, 1 << 6);
clrbits_le32(ctrl, 1 << 0);
setbits32(ctrl, 1 << 6);
clrbits32(ctrl, 1 << 0);
}
}
this->ep_halted[ep][in_dir] = set;