Lines Matching refs:info

42 static u32 bbc_count_to_reg(struct bbc_beep_info *info, unsigned int count)
44 u32 val, clock_freq = info->clock_freq;
69 struct bbc_beep_info *info = &state->u.bbc;
85 count = bbc_count_to_reg(info, count);
90 sbus_writeb(0x01, info->regs + 0);
91 sbus_writeb(0x00, info->regs + 2);
92 sbus_writeb((count >> 16) & 0xff, info->regs + 3);
93 sbus_writeb((count >> 8) & 0xff, info->regs + 4);
94 sbus_writeb(0x00, info->regs + 5);
96 sbus_writeb(0x00, info->regs + 0);
107 struct grover_beep_info *info = &state->u.grover;
127 sbus_writeb(sbus_readb(info->enable_reg) | 3, info->enable_reg);
129 sbus_writeb(0xB6, info->freq_regs + 1);
131 sbus_writeb(count & 0xff, info->freq_regs + 0);
132 sbus_writeb((count >> 8) & 0xff, info->freq_regs + 0);
135 sbus_writeb(sbus_readb(info->enable_reg) & 0xFC, info->enable_reg);
189 struct bbc_beep_info *info;
206 info = &state->u.bbc;
207 info->clock_freq = of_getintprop_default(dp, "clock-frequency", 0);
209 if (!info->clock_freq)
212 info->regs = of_ioremap(&op->resource[0], 0, 6, "bbc beep");
213 if (!info->regs)
225 of_iounmap(&op->resource[0], info->regs, 6);
237 struct bbc_beep_info *info = &state->u.bbc;
244 of_iounmap(&op->resource[0], info->regs, 6);
273 struct grover_beep_info *info;
284 info = &state->u.grover;
285 info->freq_regs = of_ioremap(&op->resource[2], 0, 2, "grover beep freq");
286 if (!info->freq_regs)
289 info->enable_reg = of_ioremap(&op->resource[3], 0, 1, "grover beep enable");
290 if (!info->enable_reg)
302 of_iounmap(&op->resource[3], info->enable_reg, 1);
305 of_iounmap(&op->resource[2], info->freq_regs, 2);
315 struct grover_beep_info *info = &state->u.grover;
323 of_iounmap(&op->resource[3], info->enable_reg, 1);
324 of_iounmap(&op->resource[2], info->freq_regs, 2);