From b4d410a1c28fcd1ea528d94eb8b94b79286c25ed Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 23 Oct 2008 10:26:02 +0100 Subject: [PATCH] Battery management - disable for stubdom The battery management arrangements do not compile for stubdom as they use direct IO, so for the moment I have stubbed them out. --- hw/battery_mgmt.c | 7 +++++++ hw/battery_mgmt.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/hw/battery_mgmt.c b/hw/battery_mgmt.c index 38b565845..0cce054fe 100644 --- a/hw/battery_mgmt.c +++ b/hw/battery_mgmt.c @@ -32,6 +32,8 @@ #include "isa.h" //register_ioport_read declaration #include "battery_mgmt.h" +#ifndef CONFIG_NO_BATTERY_MGMT + #include //#define BATTERY_MGMT_DEBUG @@ -295,3 +297,8 @@ void battery_mgmt_init(PCIDevice *device) #endif } +#else + +void battery_mgmt_init(PCIDevice *device) { } + +#endif diff --git a/hw/battery_mgmt.h b/hw/battery_mgmt.h index 9b9b427d4..dd60160ec 100644 --- a/hw/battery_mgmt.h +++ b/hw/battery_mgmt.h @@ -22,6 +22,10 @@ #ifndef _BATTERY_MGMT_H #define _BATTERY_MGMT_H +#ifdef CONFIG_STUBDOM +#define CONFIG_NO_BATTERY_MGMT +#endif + enum POWER_MGMT_MODE { PM_MODE_NONE = 0, PM_MODE_PT, PM_MODE_NON_PT }; enum BATTERY_INFO_TYPE { BATT_NONE, BIF, BST }; typedef struct battery_state_info { -- 2.39.5