summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Hargrave <jordan@cvs.openbsd.org>2009-06-01 22:36:13 +0000
committerJordan Hargrave <jordan@cvs.openbsd.org>2009-06-01 22:36:13 +0000
commit8628e01619b14365238993f2cb2c5b3e9eef7815 (patch)
tree5a7c6c68fe4b5ce7913c38ec35ed2696fb625d32
parent84a4585a99a34b714ef42ddb2c34438522eb766c (diff)
Remove dead/unused code
ok marco@
-rw-r--r--sys/dev/acpi/dsdt.c55
-rw-r--r--sys/dev/acpi/dsdt.h15
2 files changed, 15 insertions, 55 deletions
diff --git a/sys/dev/acpi/dsdt.c b/sys/dev/acpi/dsdt.c
index 4d875f7981a..361c6ae6f73 100644
--- a/sys/dev/acpi/dsdt.c
+++ b/sys/dev/acpi/dsdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsdt.c,v 1.149 2009/05/30 22:49:56 jordan Exp $ */
+/* $OpenBSD: dsdt.c,v 1.150 2009/06/01 22:36:12 jordan Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
*
@@ -2277,13 +2277,11 @@ aml_xmid(struct aml_value *src, int index, int length)
/*
* Field I/O utility functions
*/
-void aml_xresolve(struct aml_scope *, struct aml_value *);
void aml_xgasio(int, uint64_t, int, void *, int, int, const char *);
void aml_xcreatefield(struct aml_value *, int, struct aml_value *, int, int,
struct aml_value *, int, int);
void aml_xparsefieldlist(struct aml_scope *, int, int,
struct aml_value *, struct aml_value *, int);
-int aml_evalhid(struct aml_node *, struct aml_value *);
#define GAS_PCI_CFG_SPACE_UNEVAL 0xCC
@@ -2299,59 +2297,8 @@ aml_evalhid(struct aml_node *node, struct aml_value *val)
return (0);
}
-int
-aml_xgetpci(struct aml_node *node, int64_t *base)
-{
- struct aml_node *pci_root;
- struct aml_value hid;
- int64_t v;
-
- *base = 0;
- dnprintf(10,"RESOLVE PCI: %s\n", aml_nodename(node));
- for (pci_root=node->parent; pci_root; pci_root=pci_root->parent) {
- /* PCI Root object will have _HID value */
- if (aml_evalhid(pci_root, &hid) == 0) {
- aml_freevalue(&hid);
- break;
- }
- }
- if (!aml_evalinteger(NULL, node->parent, "_ADR", 0, NULL, &v))
- *base += (v << 16L);
- if (!aml_evalinteger(NULL, pci_root, "_BBN", 0, NULL, &v))
- *base += (v << 48L);
- return 0;
-}
-
-void
-aml_xresolve(struct aml_scope *scope, struct aml_value *val)
-{
- int64_t base;
-
- if (val->type != AML_OBJTYPE_OPREGION || val->v_opregion.flag)
- return;
- if (val->v_opregion.iospace != GAS_PCI_CFG_SPACE)
- return;
-
- /* Evaluate PCI Address */
- aml_xgetpci(val->node, &base);
- val->v_opregion.iobase += base;
- val->v_opregion.flag = 1;
-}
-
-union amlpci_t
-{
- uint64_t addr;
- struct {
- uint16_t reg;
- uint16_t fun;
- uint16_t dev;
- uint16_t bus;
- };
-};
-
void aml_rwfield(struct aml_value *, int, int, struct aml_value *, int);
void aml_rwgas(struct aml_value *, int, int, struct aml_value *, int, int);
-int aml_rdpciaddr(struct aml_node *pcidev, union amlpci_t *);
/* Get PCI address for opregion objects */
int
diff --git a/sys/dev/acpi/dsdt.h b/sys/dev/acpi/dsdt.h
index b1b34bd1204..9e1d72882e0 100644
--- a/sys/dev/acpi/dsdt.h
+++ b/sys/dev/acpi/dsdt.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsdt.h,v 1.43 2009/03/10 20:36:10 jordan Exp $ */
+/* $OpenBSD: dsdt.h,v 1.44 2009/06/01 22:36:12 jordan Exp $ */
/*
* Copyright (c) 2005 Marco Peereboom <marco@openbsd.org>
*
@@ -255,6 +255,7 @@ void aml_disasm(struct aml_scope *scope, int lvl,
void (*dbprintf)(void *, const char *, ...),
void *arg);
int aml_xgetpci(struct aml_node *, int64_t *);
+int aml_evalhid(struct aml_node *, struct aml_value *);
int acpi_walkmem(int, const char *);
@@ -263,4 +264,16 @@ int acpi_walkmem(int, const char *);
#define aml_get32(p) *(uint32_t *)(p)
#define aml_get64(p) *(uint64_t *)(p)
+union amlpci_t
+{
+ uint64_t addr;
+ struct {
+ uint16_t reg;
+ uint16_t fun;
+ uint16_t dev;
+ uint16_t bus;
+ };
+};
+int aml_rdpciaddr(struct aml_node *pcidev, union amlpci_t *);
+
#endif /* __DEV_ACPI_DSDT_H__ */