Since there is no command line support, just do a pure integer version Signed-off-by: Ben Widawsky <ben at bwidawsk.net> --- tools/quick_dump/chipset.i | 2 ++ tools/quick_dump/reg_access.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tools/quick_dump/chipset.i b/tools/quick_dump/chipset.i index 2f4f5ef..e1f262d 100644 --- a/tools/quick_dump/chipset.i +++ b/tools/quick_dump/chipset.i @@ -10,6 +10,7 @@ extern int is_valleyview(unsigned short pciid); extern struct pci_device *intel_get_pci_device(); extern int intel_register_access_init(struct pci_device *pci_dev, int safe); extern uint32_t intel_register_read(uint32_t reg); +extern uint32_t intel_register_write(uint32_t reg, uint32_t val); extern void intel_register_access_fini(); extern unsigned short pcidev_to_devid(struct pci_device *pci_dev); %} @@ -20,5 +21,6 @@ extern int is_valleyview(unsigned short pciid); extern struct pci_device *intel_get_pci_device(); extern int intel_register_access_init(struct pci_device *pci_dev, int safe); extern uint32_t intel_register_read(uint32_t reg); +extern uint32_t intel_register_write(uint32_t reg, uint32_t val); extern void intel_register_access_fini(); extern unsigned short pcidev_to_devid(struct pci_device *pci_dev); diff --git a/tools/quick_dump/reg_access.py b/tools/quick_dump/reg_access.py index 0f63424..e064c99 100755 --- a/tools/quick_dump/reg_access.py +++ b/tools/quick_dump/reg_access.py @@ -6,6 +6,9 @@ def read(reg): val = chipset.intel_register_read(reg) return val +def write(reg, val): + chipset.intel_register_write(reg, val) + def init(): pci_dev = chipset.intel_get_pci_device() ret = chipset.intel_register_access_init(pci_dev, 0) -- 1.8.1.4