1 |
/* |
/* |
2 |
* Copyright (C) 2004-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2004-2007 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_px.c,v 1.34 2006/03/04 12:38:48 debug Exp $ |
* $Id: dev_px.c,v 1.36 2006/12/30 13:30:59 debug Exp $ |
29 |
* |
* |
30 |
* TURBOchannel Pixelstamp graphics device. |
* TURBOchannel Pixelstamp graphics device. |
31 |
* |
* |
107 |
struct px_data *d = extra; |
struct px_data *d = extra; |
108 |
|
|
109 |
if (d->intr & STIC_INT_P_EN) /* or _WE ? */ |
if (d->intr & STIC_INT_P_EN) /* or _WE ? */ |
110 |
cpu_interrupt(cpu, d->irq_nr); |
INTERRUPT_ASSERT(d->irq); |
111 |
#endif |
#endif |
112 |
} |
} |
113 |
|
|
751 |
* dev_px_init(): |
* dev_px_init(): |
752 |
*/ |
*/ |
753 |
void dev_px_init(struct machine *machine, struct memory *mem, |
void dev_px_init(struct machine *machine, struct memory *mem, |
754 |
uint64_t baseaddr, int px_type, int irq_nr) |
uint64_t baseaddr, int px_type, char *irq_path) |
755 |
{ |
{ |
756 |
struct px_data *d; |
struct px_data *d; |
757 |
|
|
763 |
memset(d, 0, sizeof(struct px_data)); |
memset(d, 0, sizeof(struct px_data)); |
764 |
|
|
765 |
d->type = px_type; |
d->type = px_type; |
766 |
d->irq_nr = irq_nr; |
|
767 |
|
INTERRUPT_CONNECT(irq_path, d->irq); |
768 |
|
|
769 |
d->xconfig = d->yconfig = 0; /* 4x1 */ |
d->xconfig = d->yconfig = 0; /* 4x1 */ |
770 |
|
|
808 |
switch (d->type) { |
switch (d->type) { |
809 |
case DEV_PX_TYPE_PX: |
case DEV_PX_TYPE_PX: |
810 |
dev_bt459_init(machine, mem, baseaddr + 0x200000, 0, |
dev_bt459_init(machine, mem, baseaddr + 0x200000, 0, |
811 |
d->vfb_data, 8, irq_nr, BT459_PX); |
d->vfb_data, 8, irq_path, BT459_PX); |
812 |
break; |
break; |
813 |
case DEV_PX_TYPE_PXG: |
case DEV_PX_TYPE_PXG: |
814 |
case DEV_PX_TYPE_PXGPLUS: |
case DEV_PX_TYPE_PXGPLUS: |
815 |
case DEV_PX_TYPE_PXGPLUSTURBO: |
case DEV_PX_TYPE_PXGPLUSTURBO: |
816 |
dev_bt459_init(machine, mem, baseaddr + 0x300000, 0, |
dev_bt459_init(machine, mem, baseaddr + 0x300000, 0, |
817 |
d->vfb_data, d->bitdepth, irq_nr, BT459_PX); |
d->vfb_data, d->bitdepth, irq_path, BT459_PX); |
818 |
break; |
break; |
819 |
default: |
default: |
820 |
fatal("dev_px_init(): unimplemented px_type\n"); |
fatal("dev_px_init(): unimplemented px_type\n"); |