~vcs-imports/qemu/git

« back to all changes in this revision

Viewing changes to hw/pl110.c

  • Committer: ths
  • Date: 2007-10-08 12:45:38 UTC
  • Revision ID: git-v1:450d4ff553af32fc9d83fef20d7106b0151526b8
CRIS disassembler, originally from binutils, by Edgar E. Iglesias.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3356 c046a42c-6fe2-441c-8c8c-71466251a162

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 * This code is licenced under the GNU LGPL
8
8
 */
9
9
 
10
 
#include "hw.h"
11
 
#include "primecell.h"
12
 
#include "console.h"
 
10
#include "vl.h"
13
11
 
14
12
#define PL110_CR_EN   0x001
15
13
#define PL110_CR_BGR  0x100
30
28
typedef struct {
31
29
    uint32_t base;
32
30
    DisplayState *ds;
33
 
    QEMUConsole *console;
34
 
 
35
31
    /* The Versatile/PB uses a slightly modified PL110 controller.  */
36
32
    int versatile;
37
33
    uint32_t timing[4];
272
268
{
273
269
    if (width != s->cols || height != s->rows) {
274
270
        if (pl110_enabled(s)) {
275
 
            qemu_console_resize(s->console, width, height);
 
271
            dpy_resize(s->ds, width, height);
276
272
        }
277
273
    }
278
274
    s->cols = width;
330
326
    case 12: /* LCDLPCURR */
331
327
        return s->lpbase;
332
328
    default:
333
 
        cpu_abort (cpu_single_env, "pl110_read: Bad offset %x\n", (int)offset);
 
329
        cpu_abort (cpu_single_env, "pl110_read: Bad offset %x\n", offset);
334
330
        return 0;
335
331
    }
336
332
}
389
385
        s->cr = val;
390
386
        s->bpp = (val >> 1) & 7;
391
387
        if (pl110_enabled(s)) {
392
 
            qemu_console_resize(s->console, s->cols, s->rows);
 
388
            dpy_resize(s->ds, s->cols, s->rows);
393
389
        }
394
390
        break;
395
391
    case 10: /* LCDICR */
397
393
        pl110_update(s);
398
394
        break;
399
395
    default:
400
 
        cpu_abort (cpu_single_env, "pl110_write: Bad offset %x\n", (int)offset);
 
396
        cpu_abort (cpu_single_env, "pl110_write: Bad offset %x\n", offset);
401
397
    }
402
398
}
403
399
 
427
423
    s->ds = ds;
428
424
    s->versatile = versatile;
429
425
    s->irq = irq;
430
 
    s->console = graphic_console_init(ds, pl110_update_display,
431
 
                                      pl110_invalidate_display,
432
 
                                      NULL, NULL, s);
 
426
    graphic_console_init(ds, pl110_update_display, pl110_invalidate_display,
 
427
                         NULL, s);
433
428
    /* ??? Save/restore.  */
434
429
    return s;
435
430
}