From owner-freebsd-hackers@FreeBSD.ORG Fri May 20 01:05:13 2005 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A0E816A4CF for ; Fri, 20 May 2005 01:05:13 +0000 (GMT) Received: from smtp.iesy.net (mta001.iesy.net [81.210.131.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AF9A43D53 for ; Fri, 20 May 2005 01:05:11 +0000 (GMT) (envelope-from walter.pelissero@iesy.net) Received: from zaphod.home.loc (unknown [81.210.131.48]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.iesy.net (Postfix) with ESMTP id 373CD21F9F for ; Fri, 20 May 2005 03:05:08 +0200 (CEST) Received: from zaphod.home.loc (localhost [127.0.0.1]) by zaphod.home.loc (8.13.3/8.13.3) with ESMTP id j4K157In030177 for ; Fri, 20 May 2005 03:05:07 +0200 (CEST) (envelope-from wcp@zaphod.home.loc) Received: (from wcp@localhost) by zaphod.home.loc (8.13.3/8.13.1/Submit) id j4K156HC030174; Fri, 20 May 2005 03:05:06 +0200 (CEST) (envelope-from wcp) From: "Walter C. Pelissero" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17037.14274.229768.369886@zaphod.home.loc> Date: Fri, 20 May 2005 03:05:06 +0200 To: freebsd-hackers@freebsd.org X-Mailer: VM 7.19 under Emacs 22.0.50.1 X-Attribution: WP X-For-Spammers: blacklistme@pelissero.de X-MArch-Archive-Date: 2005-05-20 03:05:07 X-MArch-Archive-ID: 2281 X-MArch-Processing-Time: 0.29s X-Mailman-Approved-At: Fri, 20 May 2005 12:40:40 +0000 Subject: WRAP.1E and geode.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: walter@pelissero.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2005 01:05:13 -0000 Reading geode.c it appears (at least to me) that the led devices are created for the WRAP.1C but not for the WRAP.1E. Guessing from the dmesg output $ dmesg Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.3-RELEASE #0: Sun Mar 20 17:12:36 CET 2005 root@daemon5.neon1.net:/m0n0wall/kernels/wrap Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Geode(TM) Integrated Processor by National Semi (266.65-MHz 586-class CPU) Origin = "Geode by NSC" Id = 0x540 Stepping = 0 Features=0x808131 real memory = 134217728 (128 MB) avail memory = 109277184 (104 MB) npx0: [FAST] npx0: on motherboard npx0: INT 16 interface pcib0: pcibus 0 on motherboard pci0: on pcib0 sis0: port 0x1000-0x10ff mem 0x80000000-0x80000fff irq 10 at device 14.0 on pci0 sis0: Silicon Revision: DP83816A miibus0: on sis0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto sis0: Ethernet address: 00:0d:b9:01:12:04 sis1: port 0x1400-0x14ff mem 0x80040000-0x80040fff irq 9 at device 15.0 on pci0 sis1: Silicon Revision: DP83816A miibus1: on sis1 ukphy1: on miibus1 ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto sis1: Ethernet address: 00:0d:b9:01:12:05 sis2: port 0x1800-0x18ff mem 0x80080000-0x80080fff irq 11 at device 16.0 on pci0 sis2: Silicon Revision: DP83816A miibus2: on sis2 ukphy2: on miibus2 ukphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto sis2: Ethernet address: 00:0d:b9:01:12:06 Geode GPIO@ = f400 isab0: port 0xf600-0xf63f,0xf400-0xf43f at device 18.0 on pci0 isa0: on isab0 pci0: at device 18.1 (no driver attached) atapci0: port 0xfc00-0xfc0f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 18.2 on pci0 ata0: channel #0 on atapci0 pci0: at device 18.3 (no driver attached) * Geode CBA@ 0x9000 * Geode rev: 06 03 Timecounter "Geode" frequency 27000000 Hz quality 1000 pci0: at device 18.5 (no driver attached) cpu0 on motherboard pmtimer0 on isa0 sio0 at port 0x3f8-0x3ff irq 4 flags 0x30 on isa0 sio0: type 16550A, console sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A Timecounters tick every 1.000 msec Fast IPsec: Initialized Security Association Processing. IP Filter: v3.4.35 initialized. Default = block all, Logging = enabled md0: Preloaded image 16777216 bytes at 0xc0740624 ad0: FAILURE - SETFEATURES ENABLE RCACHE status=51 error=4 ad0: FAILURE - SETFEATURES DISABLE WCACHE status=51 error=4 ad0: 15MB [490/2/32] at ata0-master PIO4 Mounting root from ufs:/dev/md0 ipfw2 initialized, divert disabled, rule-based forwarding enabled, default to accept, logging disabled I'd say the WRAP.1E has a PCI device ID 0x0515100b as it falls in the first if-branch of the following code (from geode.c): static int geode_probe(device_t self) { if (pci_get_devid(self) == 0x0515100b) { if (geode_counter == 0) { /* * The address of the CBA is written to this register * by the bios, see p161 in data sheet. */ cba = pci_read_config(self, 0x64, 4); printf("Geode CBA@ 0x%x\n", cba); geode_counter = cba + 0x08; outl(cba + 0x0d, 2); printf("Geode rev: %02x %02x\n", inb(cba + 0x3c), inb(cba + 0x3d)); tc_init(&geode_timecounter); EVENTHANDLER_REGISTER(watchdog_list, geode_watchdog, NULL, 0); } } else if (pci_get_devid(self) == 0x0510100b) { gpio = pci_read_config(self, PCIR_BAR(0), 4); gpio &= ~0x1f; printf("Geode GPIO@ = %x\n", gpio); if (NULL != bios_string(0xf0000, 0xf0100, "Soekris Engineering", 0)) { printf("Soekris Engineering NET4801 platform\n"); led1b = 20; led1 = led_create(led_func, &led1b, "error"); } else if (NULL != bios_string(0xf9000, 0xf9000, "PC Engines WRAP.1C ", 0)) { printf("PC Engines WRAP.1C platfrom\n"); led1b = -2; led2b = -3; led3b = -18; led1 = led_create(led_func, &led1b, "led1"); led2 = led_create(led_func, &led2b, "led2"); led3 = led_create(led_func, &led3b, "led3"); /* * Turn on first LED so we don't make people think * their box just died. */ led_func(&led1b, 1); } } return (ENXIO); } Reading the PC-Engines documentation it looks to me as WRAP.1C and WRAP1.E were identical when it comes to the LEDs, thus it would be nice to have the same entries in /dev. Anyone with a better understanding of this platform cares to comment on this? -- walter pelissero http://www.pelissero.de