Added option to swap CORE and SOC
This commit is contained in:
parent
966ae5b1b5
commit
eb45c2d2a1
3 changed files with 21 additions and 11 deletions
19
Makefile
19
Makefile
|
@ -1,5 +1,6 @@
|
|||
TARGET := $(shell uname -r)
|
||||
DKMS_ROOT_PATH := /usr/src/zenpower-0.1.2
|
||||
VERSION := 0.1.3
|
||||
TARGET := $(shell uname -r)
|
||||
DKMS_ROOT_PATH := /usr/src/zenpower-0.1.3
|
||||
|
||||
ifneq ("","$(wildcard /usr/src/linux-headers-$(TARGET)/*)")
|
||||
# Ubuntu
|
||||
|
@ -16,7 +17,7 @@ endif
|
|||
obj-m := $(patsubst %,%.o,zenpower)
|
||||
obj-ko := $(patsubst %,%.ko,zenpower)
|
||||
|
||||
.PHONY: all modules clean dkms-install dkms-uninstall
|
||||
.PHONY: all modules clean dkms-install dkms-install-swapped dkms-uninstall
|
||||
|
||||
all: modules
|
||||
|
||||
|
@ -31,10 +32,14 @@ dkms-install:
|
|||
cp $(CURDIR)/dkms.conf $(DKMS_ROOT_PATH)
|
||||
cp $(CURDIR)/Makefile $(DKMS_ROOT_PATH)
|
||||
cp $(CURDIR)/zenpower.c $(DKMS_ROOT_PATH)
|
||||
dkms add zenpower/0.1.2
|
||||
dkms build zenpower/0.1.2
|
||||
dkms install zenpower/0.1.2
|
||||
|
||||
sed -e "s/@CFLGS@/${MCFLAGS}/" \
|
||||
-i $(DKMS_ROOT_PATH)/dkms.conf
|
||||
|
||||
dkms add zenpower/$(VERSION)
|
||||
dkms build zenpower/$(VERSION)
|
||||
dkms install zenpower/$(VERSION)
|
||||
|
||||
dkms-uninstall:
|
||||
dkms remove zenpower/0.1.2 --all
|
||||
dkms remove zenpower/$(VERSION) --all
|
||||
rm -rf $(DKMS_ROOT_PATH)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
MAKE="make TARGET=${kernelver}"
|
||||
MAKE="make TARGET=${kernelver} CFLAGS_MODULE+=@CFLGS@"
|
||||
CLEAN="make clean"
|
||||
PACKAGE_NAME="zenpower"
|
||||
PACKAGE_VERSION="0.1.2"
|
||||
PACKAGE_VERSION="0.1.3"
|
||||
BUILT_MODULE_NAME[0]="zenpower"
|
||||
DEST_MODULE_LOCATION[0]="/kernel/drivers/hwmon/zenpower"
|
||||
AUTOINSTALL="yes"
|
||||
|
|
|
@ -318,8 +318,13 @@ static int zenpower_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
|
||||
data->pdev = pdev;
|
||||
data->read_amdsmn_addr = read_amdsmn_addr;
|
||||
data->svi_core_addr = F17H_M01H_SVI_TEL_PLANE0;
|
||||
data->svi_soc_addr = F17H_M01H_SVI_TEL_PLANE1;
|
||||
#ifndef SWAP_CORE_SOC
|
||||
data->svi_core_addr = F17H_M01H_SVI_TEL_PLANE0;
|
||||
data->svi_soc_addr = F17H_M01H_SVI_TEL_PLANE1;
|
||||
#else
|
||||
data->svi_core_addr = F17H_M01H_SVI_TEL_PLANE1;
|
||||
data->svi_soc_addr = F17H_M01H_SVI_TEL_PLANE0;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(tctl_offset_table); i++) {
|
||||
const struct tctl_offset *entry = &tctl_offset_table[i];
|
||||
|
|
Loading…
Reference in a new issue