Home | History | Annotate | Download | only in ppc

Lines Matching refs:glue

30    glue - glue to interconnect and test interrupts
36 The glue device provides two functions. Firstly, it provides a
41 Glue devices have a variable number of big endian <<output>>
55 <<glue>>: In addition to driving its output interrupt port with any
60 <<glue-and>>: The bit-wise AND of the interrupt inputs is computed
87 | -t glue-device \
90 Create source, bitwize-and, and sink glue devices. Since the
94 | -o '/iobus@0xf0000000/glue@0x10000/reg 0x10000 8' \
95 | -o '/iobus@0xf0000000/glue-and@0x20000/reg 0x20000 4' \
96 | -o '/iobus@0xf0000000/glue-and/interrupt-ranges 0 2' \
97 | -o '/iobus@0xf0000000/glue@0x30000/reg 0x30000 4' \
102 | -o '/iobus@0xf0000000/glue@0x10000 > 0 0 /iobus/glue-and' \
103 | -o '/iobus@0xf0000000/glue@0x10000 > 1 1 /iobus/glue-and' \
109 | -o '/iobus@0xf0000000/glue-and > 0 0 /iobus/glue@0x30000' \
174 hw_glue_device *glue = (hw_glue_device*)device_data(me);
180 if (glue->output != NULL) {
181 memset(glue->output, 0, glue->sizeof_output);
190 &glue->sizeof_output, me))
193 if (glue->sizeof_output == 0)
195 if (glue->sizeof_output % sizeof(unsigned_word) != 0)
199 &unit.address, &glue->space, &glue->address,
201 if (glue->address % (sizeof(unsigned_word) * max_nr_interrupts) != 0)
204 glue->nr_outputs = glue->sizeof_output / sizeof(unsigned_word);
205 glue->output = zalloc(glue->sizeof_output);
209 if (glue->input != NULL) {
210 memset(glue->input, 0, glue->sizeof_input);
215 glue->int_number = 0;
216 glue->nr_inputs = glue->nr_outputs;
223 glue->int_number = BE2H_cell(int_range[0]);
224 glue->nr_inputs = BE2H_cell(int_range[1]);
226 glue->sizeof_input = glue->nr_inputs * sizeof(unsigned);
227 glue->input = zalloc(glue->sizeof_input);
231 if (glue->type == glue_undefined) {
233 if (strcmp(name, "glue") == 0)
234 glue->type = glue_io;
235 else if (strcmp(name, "glue-and") == 0)
236 glue->type = glue_and;
238 device_error(me, "unimplemented glue type");
241 DTRACE(glue, ("int-number %d, nr_inputs %d, nr_outputs %d\n",
242 glue->int_number, glue->nr_inputs, glue->nr_outputs));
254 hw_glue_device *glue = (hw_glue_device*)device_data(me);
255 int reg = ((addr - glue->address) / sizeof(unsigned_word)) % glue->nr_outputs;
260 *(unsigned_word*)dest = H2BE_4(glue->output[reg]);
261 DTRACE(glue, ("read - interrupt %d (0x%lx), level %d\n",
262 reg, (unsigned long) addr, glue->output[reg]));
276 hw_glue_device *glue = (hw_glue_device*)device_data(me);
277 int reg = ((addr - glue->address) / sizeof(unsigned_word)) % max_nr_interrupts;
282 glue->output[reg] = H2BE_4(*(unsigned_word*)source);
283 DTRACE(glue, ("write - interrupt %d (0x%lx), level %d\n",
284 reg, (unsigned long) addr, glue->output[reg]));
285 device_interrupt_event(me, reg, glue->output[reg], processor, cia);
298 hw_glue_device *glue = (hw_glue_device*)device_data(me);
300 if (my_port < glue->int_number
301 || my_port >= glue->int_number + glue->nr_inputs)
303 glue->input[my_port - glue->int_number] = level;
304 switch (glue->type) {
307 int port = my_port % glue->nr_outputs;
308 glue->output[port] = level;
309 DTRACE(glue, ("input - interrupt %d (0x%lx), level %d\n",
311 (unsigned long)glue->address + port * sizeof(unsigned_word),
316 glue->output[0] = glue->input[0];
317 for (i = 1; i < glue->nr_inputs; i++)
318 glue->output[0] &= glue->input[i];
319 DTRACE(glue, ("and - interrupt %d, level %d arrived - output %d\n",
320 my_port, level, glue->output[0]));
321 device_interrupt_event(me, 0, glue->output[0], processor, cia);
354 hw_glue_device *glue = ZALLOC(hw_glue_device);
355 return glue;
360 { "glue", hw_glue_create, &hw_glue_callbacks },
361 { "glue-and", hw_glue_create, &hw_glue_callbacks },
362 { "glue-nand", hw_glue_create, &hw_glue_callbacks },
363 { "glue-or", hw_glue_create, &hw_glue_callbacks },
364 { "glue-xor", hw_glue_create, &hw_glue_callbacks },
365 { "glue-nor", hw_glue_create, &hw_glue_callbacks },
366 { "glue-not", hw_glue_create, &hw_glue_callbacks },