0001
0002
0003
0004
0005
0006
0007 #ifndef _ASM_POWERPC_DCR_GENERIC_H
0008 #define _ASM_POWERPC_DCR_GENERIC_H
0009 #ifdef __KERNEL__
0010 #ifndef __ASSEMBLY__
0011
0012 enum host_type_t {DCR_HOST_MMIO, DCR_HOST_NATIVE, DCR_HOST_INVALID};
0013
0014 typedef struct {
0015 enum host_type_t type;
0016 union {
0017 dcr_host_mmio_t mmio;
0018 dcr_host_native_t native;
0019 } host;
0020 } dcr_host_t;
0021
0022 extern bool dcr_map_ok_generic(dcr_host_t host);
0023
0024 extern dcr_host_t dcr_map_generic(struct device_node *dev, unsigned int dcr_n,
0025 unsigned int dcr_c);
0026 extern void dcr_unmap_generic(dcr_host_t host, unsigned int dcr_c);
0027
0028 extern u32 dcr_read_generic(dcr_host_t host, unsigned int dcr_n);
0029
0030 extern void dcr_write_generic(dcr_host_t host, unsigned int dcr_n, u32 value);
0031
0032 #endif
0033 #endif
0034 #endif
0035
0036