Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/syscon/syscon_if.m
Show All 24 Lines | |||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
INTERFACE syscon; | INTERFACE syscon; | ||||
HEADER { | |||||
struct syscon; | |||||
} | |||||
METHOD int init { | |||||
struct syscon *syscon; | |||||
}; | |||||
METHOD int uninit { | |||||
struct syscon *syscon; | |||||
}; | |||||
/** | /** | ||||
* Accessor functions for syscon register space | * Accessor functions for syscon register space | ||||
*/ | */ | ||||
METHOD uint32_t read_4 { | METHOD uint32_t read_4 { | ||||
device_t dev; | struct syscon *syscon; | ||||
device_t consumer; | |||||
bus_size_t offset; | bus_size_t offset; | ||||
}; | }; | ||||
METHOD void write_4 { | METHOD int write_4 { | ||||
device_t dev; | struct syscon *syscon; | ||||
device_t consumer; | |||||
bus_size_t offset; | bus_size_t offset; | ||||
uint32_t val; | uint32_t val; | ||||
}; | }; | ||||
METHOD void modify_4 { | METHOD int modify_4 { | ||||
device_t dev; | struct syscon *syscon; | ||||
device_t consumer; | |||||
bus_size_t offset; | bus_size_t offset; | ||||
uint32_t clear_bits; | uint32_t clear_bits; | ||||
uint32_t set_bits; | uint32_t set_bits; | ||||
}; | }; |