Index: arch/evbppc/walnut/consinit.c =================================================================== RCS file: /opt/r/NetBSD.cvs/src/sys/arch/evbppc/walnut/consinit.c,v retrieving revision 1.1 diff -u -r1.1 consinit.c --- arch/evbppc/walnut/consinit.c 9 Dec 2002 12:16:21 -0000 1.1 +++ arch/evbppc/walnut/consinit.c 1 Jul 2003 19:32:35 -0000 @@ -109,7 +109,12 @@ #if (NCOM > 0) tag = ibm4xx_make_bus_space_tag(0, 0); - if (comcnattach(tag, CONADDR, CONSPEED, COM_FREQ*6, + if (comcnattach(tag, CONADDR, CONSPEED, +#ifdef OPENBLOCKS266 + COM_FREQ*4, +#else + COM_FREQ*6, +#endif comcnmode)) panic("can't init serial console @%x", CONADDR); else @@ -126,7 +131,12 @@ #if (NCOM > 0) if(!strcmp(kgdb_devname, "com")) { bus_space_tag_t tag = ibm4xx_make_bus_space_tag(0, 2); - com_kgdb_attach(tag, comkgdbaddr, comkgdbrate, COM_FREQ * 6, + com_kgdb_attach(tag, comkgdbaddr, comkgdbrate, +#ifdef OPENBLOCKS266 + COM_FREQ * 4, +#else + COM_FREQ * 6, +#endif comkgdbmode); } #endif Index: arch/evbppc/walnut/machdep.c =================================================================== RCS file: /opt/r/NetBSD.cvs/src/sys/arch/evbppc/walnut/machdep.c,v retrieving revision 1.9 diff -u -r1.9 machdep.c --- arch/evbppc/walnut/machdep.c 26 Apr 2003 11:05:12 -0000 1.9 +++ arch/evbppc/walnut/machdep.c 1 Jul 2003 19:32:35 -0000 @@ -153,6 +153,19 @@ struct board_cfg_data board_data; struct propdb *board_info = NULL; +#ifdef OPENBLOCKS266 +struct board_cfg_data obs266_board_data = { + "123", + "01234567890123456789012345678", + 64*1024*1024, + { 0x00, 0x0a, 0x85, 0x01, 0x86, 0xaf }, + { 0x00, 0x0a, 0x85, 0x01, 0x06, 0xaf }, + 266*1000*1000, + 133*1000*1000, + 33333333, +}; +#endif + void initppc(u_int startkernel, u_int endkernel, char *args, void *info_block) { @@ -187,6 +200,9 @@ /* XXX why isn't r3 set correctly?!?!? */ info_block = (void *)0x8e10; memcpy(&board_data, info_block, sizeof(board_data)); +#ifdef OPENBLOCKS266 + memcpy(&board_data, &obs266_board_data, sizeof(board_data)); +#endif memset(physmemr, 0, sizeof physmemr); memset(availmemr, 0, sizeof availmemr); @@ -302,6 +318,27 @@ consinit(); +#ifdef OPENBLOCKS266 + { + struct board_cfg_data dbd; + memcpy(&dbd, info_block, sizeof(dbd)); + printf("Debug Board config data[%p]:\n", info_block); + printf(" usr_config_ver = %s\n", dbd.usr_config_ver); + printf(" rom_sw_ver = %s\n", dbd.rom_sw_ver); + printf(" mem_size = %u\n", dbd.mem_size); + printf(" mac_address_local = %02x:%02x:%02x:%02x:%02x:%02x\n", + dbd.mac_address_local[0], dbd.mac_address_local[1], + dbd.mac_address_local[2], dbd.mac_address_local[3], + dbd.mac_address_local[4], dbd.mac_address_local[5]); + printf(" mac_address_pci = %02x:%02x:%02x:%02x:%02x:%02x\n", + dbd.mac_address_pci[0], dbd.mac_address_pci[1], + dbd.mac_address_pci[2], dbd.mac_address_pci[3], + dbd.mac_address_pci[4], dbd.mac_address_pci[5]); + printf(" processor_speed = %u\n", dbd.processor_speed); + printf(" plb_speed = %u\n", dbd.plb_speed); + printf(" pci_speed = %u\n", dbd.pci_speed); + } +#endif #ifdef DEBUG printf("Board config data:\n"); printf(" usr_config_ver = %s\n", board_data.usr_config_ver); @@ -392,7 +429,11 @@ printf("%s", version); +#ifdef OPENBLOCKS266 + printf("OpenBlockS266 IBM PowerPC 405GPr\n"); +#else printf("Walnut PowerPC 405GP Evaluation Board\n"); +#endif format_bytes(pbuf, sizeof(pbuf), ctob(physmem)); printf("total memory = %s\n", pbuf); @@ -495,7 +536,12 @@ panic("setting processor-frequency"); #if NCOM > 0 { - unsigned int comfreq = COM_FREQ * 6; + unsigned int comfreq; +#ifdef OPENBLOCKS266 + comfreq = COM_FREQ * 4; +#else + comfreq = COM_FREQ * 6; +#endif if (board_info_set("com-opb-frequency", &comfreq, sizeof(&comfreq), 0, 0)) panic("setting com-opb-frequency");