Browse Source

core: print voltage and temperature information

Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
master
Stefan Reinauer 8 months ago
parent
commit
0beb9ab108
2 changed files with 12 additions and 0 deletions
  1. +7
    -0
      zz9000_core.c
  2. +5
    -0
      zz9000_regs.h

+ 7
- 0
zz9000_core.c View File

@@ -46,6 +46,7 @@ static int zz9000_probe(struct zorro_dev *zdev,
const struct zorro_device_id *ent)
{
int ret = 0;
uint16_t temp;
uint32_t board = zdev->resource.start;

printk(KERN_INFO "MNT ZZ9000 driver v%s\n", ZZ9000_VERSION);
@@ -117,6 +118,12 @@ static int zz9000_probe(struct zorro_dev *zdev,
printk(KERN_INFO " HW version %d\n", zz_readw(MNTZZ_HW_VERSION));
printk(KERN_INFO " FW version %d.%d\n", zz_readw(MNTZZ_FW_VERSION) >> 8,
zz_readw(MNTZZ_FW_VERSION) & 0xff);
temp = zz_readw(MNTZZ_TEMPERATURE);
printk(KERN_INFO " Temperature %d.%02d degree C\n", temp / 10, temp % 10);
temp = zz_readw(MNTZZ_VOLTAGE_AUX);
printk(KERN_INFO " Voltage Vaux %d.%02dV\n", temp / 100, temp % 100);
temp = zz_readw(MNTZZ_VOLTAGE_INT);
printk(KERN_INFO " Voltage Vint %d.%02dV\n", temp / 100, temp % 100);

if (!ret)
return 0;


+ 5
- 0
zz9000_regs.h View File

@@ -155,6 +155,11 @@
#define MNTZZ_USB_BUFSEL 0xda
#define MNTZZ_USB_CAPACITY 0xdc

/* Monitoring */
#define MNTZZ_TEMPERATURE 0xe0
#define MNTZZ_VOLTAGE_AUX 0xe2
#define MNTZZ_VOLTAGE_INT 0xe4

/* Video Control */
#define MNTZZ_VIDEO_CTRL_DATA_HI 0x1000
#define MNTZZ_VIDEO_CTRL_DATA_LO 0x1002


Loading…
Cancel
Save