mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
staging: sm750fb: use BIT macro for DE_STATE1 single-bit field
Replace complex definition of DE_STATE1 field and usage of FIELD_SET with BIT() macro and open-coded register value modifications Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9eced7438d
commit
c808d6ce4a
@ -3,9 +3,7 @@
|
||||
|
||||
/* New register for SM750LE */
|
||||
#define DE_STATE1 0x100054
|
||||
#define DE_STATE1_DE_ABORT 0:0
|
||||
#define DE_STATE1_DE_ABORT_OFF 0
|
||||
#define DE_STATE1_DE_ABORT_ON 1
|
||||
#define DE_STATE1_DE_ABORT BIT(0)
|
||||
|
||||
#define DE_STATE2 0x100058
|
||||
#define DE_STATE2_DE_FIFO 3:3
|
||||
|
@ -468,11 +468,11 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev)
|
||||
|
||||
if (getChipType() == SM750LE) {
|
||||
reg = PEEK32(DE_STATE1);
|
||||
reg = FIELD_SET(reg, DE_STATE1, DE_ABORT, ON);
|
||||
reg |= DE_STATE1_DE_ABORT;
|
||||
POKE32(DE_STATE1, reg);
|
||||
|
||||
reg = PEEK32(DE_STATE1);
|
||||
reg = FIELD_SET(reg, DE_STATE1, DE_ABORT, OFF);
|
||||
reg &= ~DE_STATE1_DE_ABORT;
|
||||
POKE32(DE_STATE1, reg);
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user