aboutsummaryrefslogtreecommitdiff
path: root/board-qemu/slof
diff options
context:
space:
mode:
authorNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2013-07-24 14:26:32 +0530
committerNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2013-07-24 14:46:22 +0530
commit7ef84987993d1327bde0aa78f666b47da2ea5898 (patch)
tree0e3b25ff1875a4ac55d11ca104716ee8307b5644 /board-qemu/slof
parentc4ddc59f676ee4fbdb03d3905904c48b150abf85 (diff)
downloadSLOF-7ef84987993d1327bde0aa78f666b47da2ea5898.zip
SLOF-7ef84987993d1327bde0aa78f666b47da2ea5898.tar.gz
SLOF-7ef84987993d1327bde0aa78f666b47da2ea5898.tar.bz2
usb-core: adding generic dev-hci.fs
* Generic forth device file for [OEX]HCI controller. * Routines to setup hcd structure Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Avik Sil <aviksil@linux.vnet.ibm.com> [ implmented generic hc-suspend for [oe]hci ] Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Diffstat (limited to 'board-qemu/slof')
-rw-r--r--board-qemu/slof/Makefile3
-rw-r--r--board-qemu/slof/OF.fs4
-rw-r--r--board-qemu/slof/usb.fs31
3 files changed, 37 insertions, 1 deletions
diff --git a/board-qemu/slof/Makefile b/board-qemu/slof/Makefile
index 164dfd5..dc9ca50 100644
--- a/board-qemu/slof/Makefile
+++ b/board-qemu/slof/Makefile
@@ -45,7 +45,8 @@ FPPINCLUDES = -I. -I$(SLOFCMNDIR)/fs -I$(SLOFCMNDIR)
USB_FFS_FILES = \
$(SLOFCMNDIR)/fs/devices/pci-class_02.fs \
- $(SLOFCMNDIR)/fs/devices/pci-class_0c.fs
+ $(SLOFCMNDIR)/fs/devices/pci-class_0c.fs \
+ $(SLOFCMNDIR)/fs/usb/dev-hci.fs
VIO_FFS_FILES = \
$(SLOFBRDDIR)/pci-device_1af4_1000.fs \
diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs
index 7da7236..d2cfdf4 100644
--- a/board-qemu/slof/OF.fs
+++ b/board-qemu/slof/OF.fs
@@ -124,6 +124,10 @@ d# 512000000 VALUE tb-frequency \ default value - needed for "ms" to work
3f0 cp
+#include "usb.fs"
+
+400 cp
+
#include "tree.fs"
800 cp
diff --git a/board-qemu/slof/usb.fs b/board-qemu/slof/usb.fs
new file mode 100644
index 0000000..901153f
--- /dev/null
+++ b/board-qemu/slof/usb.fs
@@ -0,0 +1,31 @@
+\ *****************************************************************************
+\ * Copyright (c) 2006, 2012, 2013 IBM Corporation
+\ * All rights reserved.
+\ * This program and the accompanying materials
+\ * are made available under the terms of the BSD License
+\ * which accompanies this distribution, and is available at
+\ * http://www.opensource.org/licenses/bsd-license.php
+\ *
+\ * Contributors:
+\ * IBM Corporation - initial implementation
+\ ****************************************************************************/
+\ *
+\ * [OEX]HCI functions
+\ *
+\ ****************************************************************************
+
+STRUCT
+ /n FIELD hcd>base
+ /n FIELD hcd>type
+ /n FIELD hcd>num
+CONSTANT /hci-dev
+
+: usb-setup-hcidev ( num hci-dev -- )
+ >r
+ s" 10 config-l@ translate-my-address 3 not AND" evaluate
+ ( io-base ) r@ hcd>base !
+ s" 08 config-l@ 8 rshift 0000000F0 AND 4 rshift " evaluate
+ ( usb-type ) r@ hcd>type !
+ ( usb-num ) r@ hcd>num !
+ r> drop
+; \ No newline at end of file