1 |
/* |
/* |
2 |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-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: machine_netwinder.c,v 1.5 2006/08/19 07:58:21 debug Exp $ |
* $Id: machine_netwinder.c,v 1.17 2007/06/15 18:08:10 debug Exp $ |
29 |
|
* |
30 |
|
* COMMENT: NetWinder |
31 |
*/ |
*/ |
32 |
|
|
33 |
#include <stdio.h> |
#include <stdio.h> |
34 |
|
#include <stdlib.h> |
35 |
#include <string.h> |
#include <string.h> |
36 |
|
|
37 |
#include "bus_isa.h" |
#include "bus_pci.h" |
38 |
#include "cpu.h" |
#include "cpu.h" |
39 |
#include "device.h" |
#include "device.h" |
40 |
#include "devices.h" |
#include "devices.h" |
41 |
#include "machine.h" |
#include "machine.h" |
|
#include "machine_interrupts.h" |
|
42 |
#include "memory.h" |
#include "memory.h" |
43 |
#include "misc.h" |
#include "misc.h" |
44 |
|
|
45 |
|
|
46 |
MACHINE_SETUP(netwinder) |
MACHINE_SETUP(netwinder) |
47 |
{ |
{ |
48 |
|
char tmpstr[300]; |
49 |
|
struct pci_data *pci_bus; |
50 |
|
|
51 |
machine->machine_name = "NetWinder"; |
machine->machine_name = "NetWinder"; |
|
machine->stable = 1; |
|
52 |
|
|
53 |
if (machine->physical_ram_in_mb > 256) |
if (machine->physical_ram_in_mb > 256) |
54 |
fprintf(stderr, "WARNING! Real NetWinders cannot" |
fprintf(stderr, "WARNING! Real NetWinders cannot" |
57 |
/* CPU at 63.75 MHz, according to NetBSD's netwinder_machdep.c. */ |
/* CPU at 63.75 MHz, according to NetBSD's netwinder_machdep.c. */ |
58 |
machine->emulated_hz = 63750000; |
machine->emulated_hz = 63750000; |
59 |
|
|
60 |
machine->md_int.footbridge_data = |
snprintf(tmpstr, sizeof(tmpstr), "footbridge irq=%s.cpu[%i].irq" |
61 |
device_add(machine, "footbridge addr=0x42000000"); |
" addr=0x42000000", machine->path, machine->bootstrap_cpu); |
62 |
machine->md_interrupt = isa32_interrupt; |
pci_bus = device_add(machine, tmpstr); |
63 |
machine->isa_pic_data.native_irq = 11; |
|
64 |
|
if (machine->x11_md.in_use) { |
65 |
bus_isa_init(machine, 0, 0x7c000000, 0x80000000, 32, 48); |
bus_pci_add(machine, pci_bus, machine->memory, |
66 |
|
0xc0, 8, 0, "igsfb"); |
|
if (machine->use_x11) { |
|
|
bus_pci_add(machine, machine->md_int.footbridge_data->pcibus, |
|
|
machine->memory, 0xc0, 8, 0, "igsfb"); |
|
67 |
} |
} |
68 |
|
|
69 |
if (!machine->prom_emulation) |
if (!machine->prom_emulation) |