Lines Matching refs:info

43 static u32 bbc_count_to_reg(struct bbc_beep_info *info, unsigned int count)
45 u32 val, clock_freq = info->clock_freq;
70 struct bbc_beep_info *info = &state->u.bbc;
86 count = bbc_count_to_reg(info, count);
91 sbus_writeb(0x01, info->regs + 0);
92 sbus_writeb(0x00, info->regs + 2);
93 sbus_writeb((count >> 16) & 0xff, info->regs + 3);
94 sbus_writeb((count >> 8) & 0xff, info->regs + 4);
95 sbus_writeb(0x00, info->regs + 5);
97 sbus_writeb(0x00, info->regs + 0);
108 struct grover_beep_info *info = &state->u.grover;
128 sbus_writeb(sbus_readb(info->enable_reg) | 3, info->enable_reg);
130 sbus_writeb(0xB6, info->freq_regs + 1);
132 sbus_writeb(count & 0xff, info->freq_regs + 0);
133 sbus_writeb((count >> 8) & 0xff, info->freq_regs + 0);
136 sbus_writeb(sbus_readb(info->enable_reg) & 0xFC, info->enable_reg);
190 struct bbc_beep_info *info;
207 info = &state->u.bbc;
208 info->clock_freq = of_getintprop_default(dp, "clock-frequency", 0);
210 if (!info->clock_freq)
213 info->regs = of_ioremap(&op->resource[0], 0, 6, "bbc beep");
214 if (!info->regs)
226 of_iounmap(&op->resource[0], info->regs, 6);
238 struct bbc_beep_info *info = &state->u.bbc;
245 of_iounmap(&op->resource[0], info->regs, 6);
274 struct grover_beep_info *info;
285 info = &state->u.grover;
286 info->freq_regs = of_ioremap(&op->resource[2], 0, 2, "grover beep freq");
287 if (!info->freq_regs)
290 info->enable_reg = of_ioremap(&op->resource[3], 0, 1, "grover beep enable");
291 if (!info->enable_reg)
303 of_iounmap(&op->resource[3], info->enable_reg, 1);
306 of_iounmap(&op->resource[2], info->freq_regs, 2);
316 struct grover_beep_info *info = &state->u.grover;
324 of_iounmap(&op->resource[3], info->enable_reg, 1);
325 of_iounmap(&op->resource[2], info->freq_regs, 2);