|
|
1.1 ! root 1: \ ***************************************************************************** ! 2: \ * Copyright (c) 2004, 2008 IBM Corporation ! 3: \ * All rights reserved. ! 4: \ * This program and the accompanying materials ! 5: \ * are made available under the terms of the BSD License ! 6: \ * which accompanies this distribution, and is available at ! 7: \ * http://www.opensource.org/licenses/bsd-license.php ! 8: \ * ! 9: \ * Contributors: ! 10: \ * IBM Corporation - initial implementation ! 11: \ ****************************************************************************/ ! 12: ! 13: s" serial bus [ " type my-space pci-class-name type s" ]" type cr ! 14: ! 15: my-space pci-device-generic-setup ! 16: ! 17: ! 18: \ Handle USB OHCI controllers: ! 19: : handle-usb-ohci-class ( -- ) ! 20: \ set Memory Write and Invalidate Enable, SERR# Enable ! 21: \ (see PCI 3.0 Spec Chapter 6.2.2 device control): ! 22: 4 config-w@ 110 or 4 config-w! ! 23: pci-master-enable \ set PCI Bus master bit and ! 24: pci-mem-enable \ memory space enable for USB scan ! 25: 10 config-l@ \ get base address on stack for usb-ohci.fs ! 26: \ TODO: Use translate-address here ! 27: s" usb-ohci.fs" included ! 28: ; ! 29: ! 30: \ Check PCI sub-class and interface type of Serial Bus Controller ! 31: \ to include the appropriate driver: ! 32: : handle-sbc-subclass ( -- ) ! 33: my-space pci-class@ ffff and CASE \ get PCI sub-class and interface ! 34: 0310 OF handle-usb-ohci-class ENDOF \ USB OHCI controller ! 35: ENDCASE ! 36: ; ! 37: ! 38: handle-sbc-subclass ! 39:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.