diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-22 22:55:26 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-22 22:55:26 +0000 |
commit | e4560efe8b8567e3821c4da1b1622045cbf56d48 (patch) | |
tree | 1af332f06d32cac476cda54b9df95018866528e0 | |
parent | 18e73a0ee31aaea3d6233f0cfbfaaa6bb8b96ce7 (diff) |
Remove orphaned adb/pmu stuff; ok hshoexer@ kettenis@
-rw-r--r-- | sys/arch/macppc/dev/adb_direct.c | 14 | ||||
-rw-r--r-- | sys/arch/macppc/dev/adbvar.h | 3 | ||||
-rw-r--r-- | sys/arch/macppc/dev/pm_direct.c | 95 | ||||
-rw-r--r-- | sys/arch/macppc/dev/pm_direct.h | 8 |
4 files changed, 6 insertions, 114 deletions
diff --git a/sys/arch/macppc/dev/adb_direct.c b/sys/arch/macppc/dev/adb_direct.c index 827a4bb59b6..eab071d2c77 100644 --- a/sys/arch/macppc/dev/adb_direct.c +++ b/sys/arch/macppc/dev/adb_direct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: adb_direct.c,v 1.13 2005/10/21 22:07:45 kettenis Exp $ */ +/* $OpenBSD: adb_direct.c,v 1.14 2005/12/22 22:55:25 miod Exp $ */ /* $NetBSD: adb_direct.c,v 1.14 2000/06/08 22:10:45 tsubai Exp $ */ /* @@ -182,8 +182,6 @@ u_char *adbBuffer = (long)0; /* pointer to user data area */ void *adbCompRout = (long)0; /* pointer to the completion routine */ void *adbCompData = (long)0; /* pointer to the completion routine data */ int adbStarting = 1; /* doing ADBReInit so do polling differently */ -int adbPolling = 0; /* we are polling for service request */ -int adbPollCmd = 0; /* the last poll command we sent */ u_char adbInputBuffer[ADB_MAX_MSG_LENGTH]; /* data input buffer */ u_char adbOutputBuffer[ADB_MAX_MSG_LENGTH]; /* data output buffer */ @@ -1016,8 +1014,6 @@ adb_reinit(void) ADBDevTable[ADBNumDevices].DataAreaAddr = (long)0; ADBDevTable[ADBNumDevices].ServiceRtPtr = (void *)0; - pm_check_adb_devices(i); /* tell pm driver device - * is here */ } } @@ -1126,8 +1122,6 @@ adb_reinit(void) saveptr); #endif nonewtimes = 0; - /* tell pm driver device is here */ - pm_check_adb_devices(device); } else { #ifdef ADB_DEBUG if (adb_debug & 0x80) @@ -1517,12 +1511,6 @@ GetIndADB(ADBDataBlock * info, int index) } int -GetADBInfo(ADBDataBlock * info, int adbAddr) -{ - return (get_adb_info(info, adbAddr)); -} - -int SetADBInfo(ADBSetInfoBlock * info, int adbAddr) { return (set_adb_info(info, adbAddr)); diff --git a/sys/arch/macppc/dev/adbvar.h b/sys/arch/macppc/dev/adbvar.h index 144d41ebf02..23fccd06e35 100644 --- a/sys/arch/macppc/dev/adbvar.h +++ b/sys/arch/macppc/dev/adbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: adbvar.h,v 1.6 2005/10/21 22:07:45 kettenis Exp $ */ +/* $OpenBSD: adbvar.h,v 1.7 2005/12/22 22:55:25 miod Exp $ */ /* $NetBSD: adbvar.h,v 1.3 2000/06/08 22:10:46 tsubai Exp $ */ /*- @@ -89,7 +89,6 @@ int adb_poweroff(void); int CountADBs(void); void ADBReInit(void); int GetIndADB(ADBDataBlock * info, int index); -int GetADBInfo(ADBDataBlock * info, int adbAddr); int SetADBInfo(ADBSetInfoBlock * info, int adbAddr); int adb_read_date_time(time_t *t); int adb_set_date_time(time_t t); diff --git a/sys/arch/macppc/dev/pm_direct.c b/sys/arch/macppc/dev/pm_direct.c index fb531c308eb..fc22ea56242 100644 --- a/sys/arch/macppc/dev/pm_direct.c +++ b/sys/arch/macppc/dev/pm_direct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pm_direct.c,v 1.16 2005/12/10 13:45:38 pedro Exp $ */ +/* $OpenBSD: pm_direct.c,v 1.17 2005/12/22 22:55:25 miod Exp $ */ /* $NetBSD: pm_direct.c,v 1.9 2000/06/08 22:10:46 tsubai Exp $ */ /* @@ -79,9 +79,6 @@ * Variables for internal use */ int pmHardware = PM_HW_UNKNOWN; -u_short pm_existent_ADB_devices = 0x0; /* each bit expresses the existent ADB device */ -u_int pm_LCD_brightness = 0x0; -u_int pm_LCD_contrast = 0x0; /* these values shows that number of data returned after 'send' cmd is sent */ signed char pm_send_cmd_type[] = { @@ -174,9 +171,6 @@ int pm_send_pm2(u_char); int pm_pmgrop_pm2(PMData *); void pm_intr_pm2(void); -/* this function is MRG-Based (for testing) */ -int pm_pmgrop_mrg(PMData *); - /* these functions also use the variables of adb_direct.c */ void pm_adb_get_TALK_result(PMData *); void pm_adb_get_ADB_data(PMData *); @@ -240,19 +234,6 @@ pm_setup_adb() /* - * Check the existent ADB devices - */ -void -pm_check_adb_devices(int id) -{ - u_short ed = 0x1; - - ed <<= id; - pm_existent_ADB_devices |= ed; -} - - -/* * Wait until PM IC is busy */ int @@ -765,47 +746,7 @@ pm_set_date_time(time_t time) pmgrop(&p); } -int -pm_read_brightness() -{ - PMData p; - - p.command = PMU_READ_BRIGHTNESS; - p.num_data = 1; /* XXX why 1? */ - p.s_buf = p.r_buf = p.data; - p.data[0] = 0; - pmgrop(&p); - - return p.data[0]; -} - -void -pm_set_brightness(int val) -{ - PMData p; - - val = 0x7f - val / 2; - if (val < 0x08) - val = 0x08; - if (val > 0x78) - val = 0x78; - - p.command = PMU_SET_BRIGHTNESS; - p.num_data = 1; - p.s_buf = p.r_buf = p.data; - p.data[0] = val; - pmgrop(&p); -} - -void -pm_init_brightness() -{ - int val; - - val = pm_read_brightness(); - pm_set_brightness(val); -} - +#if 0 void pm_eject_pcmcia(int slot) { @@ -820,6 +761,7 @@ pm_eject_pcmcia(int slot) p.data[0] = 5 + slot; /* XXX */ pmgrop(&p); } +#endif /* @@ -865,34 +807,3 @@ pm_battery_info(int battery, struct pmu_battery_info *info) return 1; } - - - -int -pm_read_nvram(int addr) -{ - PMData p; - - p.command = PMU_READ_NVRAM; - p.num_data = 2; - p.s_buf = p.r_buf = p.data; - p.data[0] = addr >> 8; - p.data[1] = addr; - pmgrop(&p); - - return p.data[0]; -} - -void -pm_write_nvram(int addr, int val) -{ - PMData p; - - p.command = PMU_WRITE_NVRAM; - p.num_data = 3; - p.s_buf = p.r_buf = p.data; - p.data[0] = addr >> 8; - p.data[1] = addr; - p.data[2] = val; - pmgrop(&p); -} diff --git a/sys/arch/macppc/dev/pm_direct.h b/sys/arch/macppc/dev/pm_direct.h index c096fe55cb4..41d7a57628c 100644 --- a/sys/arch/macppc/dev/pm_direct.h +++ b/sys/arch/macppc/dev/pm_direct.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pm_direct.h,v 1.8 2005/12/10 13:45:38 pedro Exp $ */ +/* $OpenBSD: pm_direct.h,v 1.9 2005/12/22 22:55:25 miod Exp $ */ /* $NetBSD: pm_direct.h,v 1.5 1999/07/12 15:54:55 tsubai Exp $ */ /* @@ -51,7 +51,6 @@ int pmgrop(PMData *); int pm_adb_op(u_char *, void *, void *, int); void pm_adb_restart(void); void pm_adb_poweroff(void); -void pm_check_adb_devices(int); void pm_intr(void); void pm_read_date_time(time_t *); void pm_set_date_time(time_t); @@ -68,11 +67,6 @@ struct pmu_battery_info int pm_battery_info(int, struct pmu_battery_info *); -int pm_read_nvram(int); -void pm_write_nvram(int, int); -int pm_read_brightness(void); -void pm_set_brightness(int); -void pm_init_brightness(void); void pm_eject_pcmcia(int); /* PMU commands */ |