--- trunk/src/machines/machine_pmppc.c 2007/10/08 16:22:32 42 +++ trunk/src/machines/machine_sandpoint.c 2007/10/13 12:51:47 62 @@ -25,9 +25,9 @@ * SUCH DAMAGE. * * - * $Id: machine_pmppc.c,v 1.12 2007/06/15 18:08:10 debug Exp $ + * $Id: machine_sandpoint.c,v 1.12 2007/06/15 18:08:10 debug Exp $ * - * COMMENT: Artesyn's PM/PPC board + * COMMENT: Sandpoint PPC board implemented as D-Link DSM-G600 */ #include @@ -44,47 +44,70 @@ -MACHINE_SETUP(pmppc) +MACHINE_SETUP(sandpoint) { struct pci_data *pci_data; - char tmpstr[300]; +// char tmpstr[300]; /* - * NetBSD/pmppc (http://www.netbsd.org/ports/pmppc/) + * NetBSD/sandpoint (http://www.netbsd.org/ports/sandpoint/) */ - machine->machine_name = "Artesyn's PM/PPC board"; + machine->machine_name = "Sandpoint D-Link DSM-G600 PPC board"; - /* Bogus default speed = 33 MHz */ + /* Bogus default speed = 133 MHz */ if (machine->emulated_hz == 0) - machine->emulated_hz = 33000000; + machine->emulated_hz = 133000000; - /* PM/PPC specific motherboard registers: */ - device_add(machine, "pmppc"); + /* Sandpoint PPC specific motherboard registers: */ + device_add(machine, "sandpoint"); - /* PCI and Interrupt controller: */ - pci_data = device_add(machine, "cpc700"); + // OpenPIC FIXME + device_add(machine, "gc addr=0xfc041000"); +#if 0 + snprintf(tmpstr, sizeof(tmpstr), "prep irq=%s.cpu[%i]", + machine->path, machine->bootstrap_cpu); + device_add(machine, tmpstr); +#endif + + /* PCI and Interrupt controller (hostbus) */ + pci_data = dev_mpc10x_init(machine, machine->memory, 0xfe000000, + 64 /* isa irq base */, 128 /* pci irq: TODO */); + + /* serial port */ + + machine->main_console_handle = (size_t) + device_add(machine, "ns16550 addr=0xfc004500"); +#if 0 + snprintf(tmp, sizeof(tmp), "ns16550 irq=%s.mpc10x.%i addr=0x%llx " + "name2=tty1", devinit->interrupt_path, 31 - MPC_IB_UART_1, + (long long)fc004600); + device_add(devinit->machine, tmp); +#endif +#if 0 /* RTC at "ext int 5" = "int 25" in IBM jargon, int 31-25 = 6 for the rest of us. */ - snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].cpc700.%i", + snprintf(tmpstr, sizeof(tmpstr), "%s.cpu[%i].mpc10x.%i", machine->path, machine->bootstrap_cpu, 31-25); dev_mc146818_init(machine, machine->memory, 0x7ff00000, tmpstr, - MC146818_PMPPC, 1); + MC146818_SANDPOINT, 1); bus_pci_add(machine, pci_data, machine->memory, 0, 8, 0, "dec21143"); +#endif + } -MACHINE_DEFAULT_CPU(pmppc) +MACHINE_DEFAULT_CPU(sandpoint) { - machine->cpu_name = strdup("PPC750"); + machine->cpu_name = strdup("PPC603e"); } -MACHINE_REGISTER(pmppc) +MACHINE_REGISTER(sandpoint) { - MR_DEFAULT(pmppc, "Artesyn's PM/PPC board", ARCH_PPC, MACHINE_PMPPC); + MR_DEFAULT(sandpoint, "Sandpoint D-Link DSM-G600 PPC board", ARCH_PPC, MACHINE_SANDPOINT); - machine_entry_add_alias(me, "pmppc"); + machine_entry_add_alias(me, "sandpoint"); }