Lines Matching defs:config

41 auich_reg_read_8(device_config *config, uint8 regno)
44 ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 255) || regno <= 63);
45 if (config->type & TYPE_ICH4)
46 return *(uint8 *)(((char *)config->log_mbbar) + regno);
48 return pci->read_io_8(config->nabmbar + regno);
52 auich_reg_read_16(device_config *config, uint8 regno)
55 ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 255) || regno <= 63);
56 if (config->type & TYPE_ICH4)
57 return *(uint16 *)(((char *)config->log_mbbar) + regno);
59 return pci->read_io_16(config->nabmbar + regno);
63 auich_reg_read_32(device_config *config, uint8 regno)
66 ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 255) || regno <= 63);
67 if (config->type & TYPE_ICH4)
68 return *(uint32 *)(((char *)config->log_mbbar) + regno);
70 return pci->read_io_32(config->nabmbar + regno);
74 auich_reg_write_8(device_config *config, uint8 regno, uint8 value)
77 ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 255) || regno <= 63);
78 if (config->type & TYPE_ICH4)
79 *(uint8 *)(((char *)config->log_mbbar) + regno) = value;
81 pci->write_io_8(config->nabmbar + regno, value);
85 auich_reg_write_16(device_config *config, uint8 regno, uint16 value)
88 ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 255) || regno <= 63);
89 if (config->type & TYPE_ICH4)
90 *(uint16 *)(((char *)config->log_mbbar) + regno) = value;
92 pci->write_io_16(config->nabmbar + regno, value);
96 auich_reg_write_32(device_config *config, uint8 regno, uint32 value)
99 ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 255) || regno <= 63);
100 if (config->type & TYPE_ICH4)
101 *(uint32 *)(((char *)config->log_mbbar) + regno) = value;
103 pci->write_io_32(config->nabmbar + regno, value);
111 auich_codec_wait(device_config *config)
116 if ((auich_reg_read_8(config, AUICH_REG_ACC_SEMA) & 0x01) == 0)
131 auich_codec_read(device_config *config, uint8 regno)
135 ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 511) || regno <= 255);
136 if (auich_codec_wait(config)!=B_OK) {
141 if (config->type & TYPE_ICH4)
142 return *(uint16 *)(((char *)config->log_mmbar) + regno);
144 return pci->read_io_16(config->nambar + regno);
148 auich_codec_write(device_config *config, uint8 regno, uint16 value)
152 ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 511) || regno <= 255);
153 if (auich_codec_wait(config)!=B_OK) {
157 if (config->type & TYPE_ICH4)
158 *(uint16 *)(((char *)config->log_mmbar) + regno) = value;
160 pci->write_io_16(config->nambar + regno, value);