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_iq80321.c,v 1.19 2006/06/24 10:19:19 debug Exp $ |
* $Id: machine_iq80321.c,v 1.24 2007/02/05 16:49:21 debug Exp $ |
29 |
*/ |
*/ |
30 |
|
|
31 |
#include <stdio.h> |
#include <stdio.h> |
32 |
|
#include <stdlib.h> |
33 |
#include <string.h> |
#include <string.h> |
34 |
|
|
35 |
#include "bus_pci.h" |
#include "bus_pci.h" |
37 |
#include "device.h" |
#include "device.h" |
38 |
#include "devices.h" |
#include "devices.h" |
39 |
#include "machine.h" |
#include "machine.h" |
|
#include "machine_interrupts.h" |
|
40 |
#include "memory.h" |
#include "memory.h" |
41 |
#include "misc.h" |
#include "misc.h" |
42 |
|
|
43 |
|
|
44 |
MACHINE_SETUP(iq80321) |
MACHINE_SETUP(iq80321) |
45 |
{ |
{ |
46 |
struct i80321_data *i80321_data; |
char tmpstr[300]; |
47 |
struct pci_data *pci; |
struct pci_data *pci; |
48 |
|
|
49 |
/* |
/* |
55 |
machine->machine_name = "Intel IQ80321"; |
machine->machine_name = "Intel IQ80321"; |
56 |
machine->stable = 1; |
machine->stable = 1; |
57 |
|
|
|
machine->md_interrupt = i80321_interrupt; |
|
58 |
cpu->cd.arm.coproc[6] = arm_coproc_i80321_6; |
cpu->cd.arm.coproc[6] = arm_coproc_i80321_6; |
59 |
|
|
60 |
i80321_data = device_add(machine, "i80321 addr=0xffffe000"); |
snprintf(tmpstr, sizeof(tmpstr), "i80321 irq=%s.cpu[%i].irq " |
61 |
pci = i80321_data->pci_bus; |
"addr=0xffffe000", machine->path, machine->bootstrap_cpu); |
62 |
|
pci = device_add(machine, tmpstr); |
63 |
device_add(machine, "ns16550 irq=28 addr=0xfe800000 " |
|
64 |
"name2='serial console'"); |
snprintf(tmpstr, sizeof(tmpstr), "ns16550 irq=%s.cpu[%i].irq." |
65 |
|
"i80321.%i addr=0xfe800000 name2='serial console'", |
66 |
|
machine->path, machine->bootstrap_cpu, 28); |
67 |
|
device_add(machine, tmpstr); |
68 |
|
|
69 |
/* 0xa0000000 = physical ram, 0xc0000000 = uncached */ |
/* 0xa0000000 = physical ram, 0xc0000000 = uncached */ |
70 |
dev_ram_init(machine, 0xa0000000, 0x20000000, DEV_RAM_MIRROR, 0x0); |
dev_ram_init(machine, 0xa0000000, 0x20000000, DEV_RAM_MIRROR, 0x0); |