On Tue, May 03, 2011 at 08:11:52AM +0530, Martin Pieuchot wrote:
> On macppc, the pm_* methods are always attached to a PMU (or PMU99), so
> no need to check for hardware.
>
> Tested here with a powerbook6,5.
>
> Ok?
This appears to be working fine on my PowerBook4,1 (ibook g3), will do more
testing tomorrow if needed. There's no dmesg change.
[ using 481912 bytes of bsd ELF symbol table ]
console out [ATY,RageM3p29s]console in [keyboard] , using ADB
: memaddr 9400 size 400, : consaddr 96008000, : ioaddr 9002, size
2: memtag 8000, iotag 8000: width 1024 linebytes 1024 height 768 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2011 OpenBSD. All rights reserved. http://www.OpenBSD.org
OpenBSD 4.9-current (GENERIC) #0: Tue Oct 5 17:18:42 CEST 2010
jasper@cupertino:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 402653184 (384MB)
avail mem = 376979456 (359MB)
mainbus0 at root: model PowerBook4,1
cpu0 at mainbus0: 750 (Revision 0x3311): 600 MHz: 256KB backside cache
mem0 at mainbus0
spdmem0 at mem0: SDRAM non-parity PC66
spdmem1 at mem0: 256MB SDRAM non-parity PC100CL2
memc0 at mainbus0: uni-n
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
mpcpcibr0 at mainbus0 pci: uni-north, Revision 0xff
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple Pangea AGP" rev 0x00
vgafb0 at pci0 dev 16 function 0 "ATI Mobility M3" rev 0x02, mmio
wsdisplay0 at vgafb0 mux 1: console (std, vt100 emulation)
mpcpcibr1 at mainbus0 pci: uni-north, Revision 0x0
pci1 at mpcpcibr1 bus 0
pchb1 at pci1 dev 11 function 0 "Apple Pangea" rev 0x00
macobio0 at pci1 dev 23 function 0 "Apple Pangea Macio" rev 0x00
openpic0 at macobio0 offset 0x4: version 0x4614 little endian
macgpio0 at macobio0 offset 0x50
macgpio1 at macgpio0 irq 47
pgs0 at macgpio0: irq 55
"firewire-linkon" at macgpio0 not configured
"gpio1" at macgpio0 not configured
"gpio9" at macgpio0 not configured
"extint-gpio4" at macgpio0 not configured
"extint-gpio12" at macgpio0 not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zsc0 at macobio0 offset 0x13000: irq 22,23
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
tumbler0 at macobio0 offset 0x1: irq 30,1,2
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000 irq 25: via-pmu, 3 targets
akbd0 at adb0 addr 2: PowerBook G4 keyboard (Inverted T)
wskbd0 at akbd0: console keyboard, using wsdisplay0
ams0 at adb0 addr 3: EMP trackpad 2-button, 400 dpi
wsmouse0 at ams0 mux 0
abtn0 at adb0 addr 7: brightness/volume/eject buttons
apm0 at adb0: battery flags 0x5, 7% charged
"battery" at macobio0 offset 0x0 not configured
"backlight" at macobio0 offset 0xf300 not configured
kiic1 at macobio0 offset 0x18000
iic1 at kiic1
wdc0 at macobio0 offset 0x1f000 irq 19: DMA
wd0 at wdc0 channel 0 drive 0:
wd0: 16-sector PIO, LBA48, 38154MB, 78140160 sectors
atapiscsi0 at wdc0 channel 0 drive 1
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: ATAPI 5/cdrom
removable
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2
cd0(wdc0:0:1): using PIO mode 4, DMA mode 2
wi0 at macobio0 offset 0x3 irq 57:
wi0: Firmware 4.16 variant 1, address 00:10:c6:6a:93:64
audio0 at tumbler0
ohci0 at pci1 dev 24 function 0 "Apple Pangea USB" rev 0x00: irq 27, version 1.0
ohci1 at pci1 dev 25 function 0 "Apple Pangea USB" rev 0x00: irq 28, version 1.0
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "Apple OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 "Apple OHCI root hub" rev 1.00/1.00 addr 1
mpcpcibr2 at mainbus0 pci: uni-north, Revision 0x16
pci2 at mpcpcibr2 bus 0
pchb2 at pci2 dev 11 function 0 "Apple Pangea PCI" rev 0x00
"Apple Pangea FireWire" rev 0x00 at pci2 dev 14 function 0 not configured
gem0 at pci2 dev 15 function 0 "Apple Pangea GMAC" rev 0x00: irq 41, address
00:03:93:62:98:f8
bmtphy0 at gem0 phy 0: BCM5221 100baseTX PHY, rev. 4
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
bootpath: /pci@f200/mac-io@17/ata-4@1f000/disk@0:/bsd
root on wd0a swap on wd0b dump on wd0b
> Index: dev/adb.c
> ===
> RCS file: /cvs/src/sys/arch/macppc/dev/adb.c,v
> retrieving revision 1.29
> diff -u -p -r1.29 adb.c
> --- dev/adb.c 1 Feb 2009 17:04:26 - 1.29
> +++ dev/adb.c 3 May 2011 02:27:28 -
> @@ -1307,7 +1307,6 @@ adb_setup_hw_type(void)
>
> case ADB_HW_PMU:
> adbSoftPower = 1;
> - pm_setup_adb();
> return;
>
> default:
> Index: dev/pm_direct.c
> ===
> RCS file: /cvs/src/sys/arch/macppc/dev/pm_direct.c,v
> retrieving revision 1.22
> diff -u -p -r1.22 pm_direct.c
> --- dev/pm_direct.c 18 Feb 2007 19:33:48 - 1.22
> +++ dev/pm_direct.c 3 May 2011 02:27:28 -
> @@ -54,10 +54,6 @@
> /* hardware dependent values */
>