Skip to content

Commit bd67f27

Browse files
MingcongBaiKexyBiscuit
authored andcommitted
AOSCOS: MIPS: ls7a_fan: use register addresses in loongson.h
Original driver code expects register definition in loongson-pch.h (where LS7A register definitions were never merged upstream), which are now revised and stored in loongson.h. Miscellaneous register base (LS7A_MISC_REG_BASE) starts at: LOONGSON_PCILO0_BASE + 0x80000 According to legacy loongson-pch.h from Lemote. Revise definition for LS7A_PWM_REG_BASE to be: LOONGSON_PCILO0_BASE (LS7A_PCH_REG_BASE in loongson-pch.h) + 0x80000 = LS7A_MISC_REG_BASE LS7A_MISC_REG_BASE + 0x2000 = LS7A_PWM_REG_BASE Fixes: "AOSCOS: MIPS: ls7a_fan: use register addresses in loongson.h" Signed-off-by: Mingcong Bai <[email protected]> Signed-off-by: Kexy Biscuit <[email protected]>
1 parent f4d51a5 commit bd67f27

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/platform/mips/ls7a_fan.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@
99
#include <asm/io.h>
1010

1111
#include <boot_param.h>
12-
#include <loongson-pch.h>
12+
#include <loongson.h>
1313
#include <loongson_hwmon.h>
1414

15-
#define LS7A_PWM_REG_BASE (void *)TO_UNCAC(LS7A_MISC_REG_BASE + 0x20000)
15+
/**
16+
* Miscellaneous register base (LS7A_MISC_REG_BASE) starts at
17+
* LOONGSON_PCILO0_BASE + 0x80000, according to legacy loongson-pch.h
18+
* from Lemote.
19+
*/
20+
#define LS7A_PWM_REG_BASE (void *)TO_UNCAC(LOONGSON_PCILO0_BASE + \
21+
0x80000 + 0x20000)
1622

1723
#define LS7A_PWM0_LOW 0x004
1824
#define LS7A_PWM0_FULL 0x008

0 commit comments

Comments
 (0)