Bernhard Urban [Tue, 29 Sep 2009 10:20:29 +0000 (12:20 +0200)]
preps for marcans bt hax
Bernhard Urban [Mon, 28 Sep 2009 18:42:53 +0000 (20:42 +0200)]
some usb stack related clean up; BULK still untested
Bernhard Urban [Sat, 26 Sep 2009 12:00:02 +0000 (14:00 +0200)]
some testcode for bluetooth stuff, thanks to marcan.
Bernhard Urban [Sat, 26 Sep 2009 09:15:00 +0000 (11:15 +0200)]
some routines for removing a device on demand. thist do not work properly
(TODO!)
Bernhard Urban [Sat, 26 Sep 2009 07:53:23 +0000 (09:53 +0200)]
added set_rate for HID devices; keyboard driver works fine at proper
rate now, but console output still sucks a bit ;)
Bernhard Urban [Sat, 26 Sep 2009 06:40:27 +0000 (08:40 +0200)]
intterupt transfers done right now. however, the keyboard driver behave
still buggy.
bulk transfers also added, but UNTESTED!
theStack [Thu, 24 Sep 2009 02:12:07 +0000 (04:12 +0200)]
fixed memory leak (in a few h memory would be full)
better solution in this case: let not return usb_hidkb_getChars()
newly allocated structure, but instead the user should provide
memory for the structure and let him pass a pointer to that structure
to the function (but i didn't want to change the interface so far)
theStack [Thu, 24 Sep 2009 01:48:44 +0000 (03:48 +0200)]
fixed buffer overflow on str
theStack [Thu, 24 Sep 2009 01:44:38 +0000 (03:44 +0200)]
added simple keycode->char lookup functionality
and tried to make it a bit more nice in main.c :)
don't know if it works though, hopefully it does...
theStack [Wed, 23 Sep 2009 19:07:00 +0000 (21:07 +0200)]
add global hcca pointer for avoiding redundant code
+ makefile fix for the last commit
theStack [Wed, 23 Sep 2009 18:46:23 +0000 (20:46 +0200)]
just deleted useless files
Bernhard Urban [Wed, 23 Sep 2009 16:47:10 +0000 (18:47 +0200)]
various changes
Bernhard Urban [Wed, 23 Sep 2009 15:54:36 +0000 (17:54 +0200)]
added [A-Z0-9] support ;)
all in all, very dirty, see HID spec for more details on it
Bernhard Urban [Wed, 23 Sep 2009 15:42:23 +0000 (17:42 +0200)]
Merge branch 'master' into usbkb_sauter
Conflicts:
Makefile
gecko.c
hollywood.h
main.c
Bernhard Urban [Wed, 23 Sep 2009 15:37:20 +0000 (17:37 +0200)]
will boot sysmenu when press reset button and again license stuff
Bernhard Urban [Wed, 23 Sep 2009 14:56:34 +0000 (16:56 +0200)]
license stuff
Bernhard Urban [Wed, 23 Sep 2009 13:39:31 +0000 (15:39 +0200)]
added hidkb driver and a simple example
Bernhard Urban [Wed, 23 Sep 2009 11:57:46 +0000 (13:57 +0200)]
w00000000000t
Bernhard Urban [Wed, 23 Sep 2009 10:59:10 +0000 (12:59 +0200)]
BLEH, WTF :( {s,g}et_configuration still won't work and I fucking don't know
anything why
added usb capture of linux when config my usb keyboard
Bernhard Urban [Wed, 23 Sep 2009 06:07:40 +0000 (08:07 +0200)]
first attempt to get interrupt transfers working. epic fail :(
{s,g}et_configuration still don't work (hence, so do {s,g}et_interface)
Bernhard Urban [Wed, 23 Sep 2009 04:04:48 +0000 (06:04 +0200)]
wtf, for some devices {s,g}et_configuration works:
o internal usb bluetooth dongle
o "Driving Force Pro" from Logitech
o USB RF Remote Receiver
do not work:
o Compaq USB Keyboard
o Gameport to USB adaptor
o Logitech USB mouse
o 2 various USB sticks
o Hercules DJ Control MP3
o Hauppauge Nova-T DVB-T stick
a Microsoft Sidewinder Wheel also don't work, but the Endpoint will
halt and output this:
>>>>>>>>
usb_set_configuration(ret: 0): 1
halted!
n: 0x800D6890
n(after) hexdump (32) @ 0x800D6890:
00000000 00 00 ec 03 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
**************** dbg_td_flag: 0x03EC0000 ***************
CC: 0 should be 0, see page 32 (ohci spec)
EC: 0 see page 20 (ohci spec)
T: 3
DI: 7
DP: 1
R: 1
********************************************************
prev: 0x800D6860
prev(after) hexdump (32) @ 0x800D6860:
00000000 00 00 f4 40 30 6e 01 00 20 68 0d 00 33 6e 01 00 ...@0n.. h..3n..
00000010 80 01 6e 30 00 00 00 04 00 00 00 00 00 00 00 00 ..n0............
prev->bufaddr(after) hexdump (4) @ 0x80016E30:
00000000 80 08 00 00 ....
**************** dbg_td_flag: 0x40F40000 ***************
CC: 4 should be 0, see page 32 (ohci spec)
EC: 0 see page 20 (ohci spec)
T: 0
DI: 7
DP: 2
R: 1
********************************************************
halted end!
=============
after usb_get_configuration:
00000000 80 .
=============
usb_get_configuration: 128
<<<<<<<<
where CC=4 means "DataOverrun". However, I don't think this information
is useful :/
Bernhard Urban [Wed, 23 Sep 2009 03:04:05 +0000 (05:04 +0200)]
oh, hello bluetooth dongle :D
do the whole thing more generic ...
Bernhard Urban [Wed, 23 Sep 2009 02:41:11 +0000 (04:41 +0200)]
fullspeed devices will be detected now
Bernhard Urban [Tue, 22 Sep 2009 13:57:55 +0000 (15:57 +0200)]
usb_{s,g}et_configuration doing it wrong :/
Bernhard Urban [Tue, 22 Sep 2009 12:56:11 +0000 (14:56 +0200)]
again a "funny" problem @ u/c/core.c: #{un,}define WTF and see
yourself
also look at "LOAD" messages and their values on gecko output
Bernhard Urban [Tue, 22 Sep 2009 12:18:18 +0000 (14:18 +0200)]
added lsusb and some more config stuff. except of some (simple) setter
functions it should be fine now for some interrupt transfer hax :)
Bernhard Urban [Tue, 22 Sep 2009 09:13:31 +0000 (11:13 +0200)]
more refactor
Bernhard Urban [Tue, 22 Sep 2009 08:08:47 +0000 (10:08 +0200)]
m00h @ previous commit: using wTotalLenght of CONFIGURATION you get
CONFIGURATION, INTERFACE(s) and ENDPOINT(s) in one big request. WIP
Bernhard Urban [Tue, 22 Sep 2009 07:30:04 +0000 (09:30 +0200)]
further refactoring; usb_get_desc_interfac doesn't work yet
Bernhard Urban [Tue, 22 Sep 2009 07:12:18 +0000 (09:12 +0200)]
refactoring ugly typedefs...
Bernhard Urban [Tue, 22 Sep 2009 06:09:48 +0000 (08:09 +0200)]
bleh, somehow the last character of a STRING do not receive :/
Bernhard Urban [Tue, 22 Sep 2009 04:28:23 +0000 (06:28 +0200)]
quirk replacement (control): simple delay (~11ms)
I noticed that when gecko-printf were disabled (by #ifdef):
on the first upload, all seems to be ok (aka "cold boot"). on further
uploads it stucked. after enable gecko-printf again, it worked quite
fine... so here zeh uber quirk!
btw ... wtf? :/
Bernhard Urban [Tue, 22 Sep 2009 03:58:50 +0000 (05:58 +0200)]
simple changes to the stack
Bernhard Urban [Mon, 21 Sep 2009 09:27:17 +0000 (11:27 +0200)]
@get_descriptor|String: disable control quirk *sigh* and keep in mind to do not request more data as defined in bLength otherwise the endpoint will halt
Bernhard Urban [Mon, 21 Sep 2009 08:51:17 +0000 (10:51 +0200)]
added debug defs
Bernhard Urban [Mon, 21 Sep 2009 03:04:12 +0000 (05:04 +0200)]
some more device info \o/
theStack [Mon, 21 Sep 2009 02:19:04 +0000 (04:19 +0200)]
ed is static now, and it works! \o/
Bernhard Urban [Mon, 21 Sep 2009 00:44:54 +0000 (02:44 +0200)]
after a warm start we have really odd memory issues:
ohci0 isn't able to read or write (actually we don't know exactly) from an
allocated resource.
may some malloc/free/sync/mmu fail?! no idea! :(
therefore here a hack to in ohci_init. when the ohci isn't in the RESET
state (that is after an hardware reset), we know it is an warm start and
allocated some memory... but this is no real useful workaround :(
Bernhard Urban [Sun, 20 Sep 2009 21:57:56 +0000 (23:57 +0200)]
do-while for mr. stack!
Bernhard Urban [Sun, 20 Sep 2009 21:50:20 +0000 (23:50 +0200)]
done head fixed; we poll edhead->headp until it is null, to get sure
all TDs are done
Bernhard Urban [Sun, 20 Sep 2009 19:09:57 +0000 (21:09 +0200)]
ISI exception fixed. as expected, a sync fail. however, done head is
null. why?
Bernhard Urban [Sun, 20 Sep 2009 10:02:10 +0000 (12:02 +0200)]
weird ISI exception bug, WZF
also added reverse list lookup for done queue
Bernhard Urban [Sun, 20 Sep 2009 06:19:07 +0000 (08:19 +0200)]
do it more generic, but it fails :/
Bernhard Urban [Sun, 20 Sep 2009 05:19:24 +0000 (07:19 +0200)]
some cleanup, incl. free'ing of allocated stuff (without malloc fail)
Bernhard Urban [Sun, 20 Sep 2009 03:10:34 +0000 (05:10 +0200)]
w00t, finally we get some serioes response from a usb device! \o/
GET_DESCRIPTOR (with 8 bytes) works!
Bernhard Urban [Sun, 20 Sep 2009 02:46:04 +0000 (04:46 +0200)]
as promised, brand new ugly hax!!11
Bernhard Urban [Sun, 20 Sep 2009 02:09:11 +0000 (04:09 +0200)]
some clean up (for more dirt!! \o/)
Bernhard Urban [Sun, 20 Sep 2009 01:40:48 +0000 (03:40 +0200)]
amend it!
Bernhard Urban [Sun, 20 Sep 2009 00:35:11 +0000 (02:35 +0200)]
discoverd weird endianness bug in sauter's usport. fixed
Bernhard Urban [Sat, 19 Sep 2009 23:39:13 +0000 (01:39 +0200)]
data{0,1} now decided by endpoint (for PID_IN) (see p22/23 @ ohci specs
for details)
Bernhard Urban [Sat, 19 Sep 2009 20:31:54 +0000 (22:31 +0200)]
control_quirk seems to be evil and our buf must be "80 06 00 01 00 00 40 00" for setup!
Bernhard Urban [Sat, 19 Sep 2009 18:36:05 +0000 (20:36 +0200)]
some changes... still blah
@
a097034:
with my usb keyboard, the buffer pointer will be set to NULL. afaik that
is a proper value
Bernhard Urban [Sat, 19 Sep 2009 05:54:06 +0000 (07:54 +0200)]
cbp will be count up, but only with low speed devices (except my usb
keyboard o_X)
Bernhard Urban [Sat, 19 Sep 2009 03:06:27 +0000 (05:06 +0200)]
further pfusch :) as usual, see difflog for details
theStack [Sat, 19 Sep 2009 02:22:39 +0000 (04:22 +0200)]
corrected memalign call
Bernhard Urban [Sat, 19 Sep 2009 00:36:53 +0000 (02:36 +0200)]
various changes, see difflog for details!
theStack [Fri, 18 Sep 2009 23:52:48 +0000 (01:52 +0200)]
adapted setup_port to old, clean state
but with our evil return; hack :)
theStack [Fri, 18 Sep 2009 23:41:06 +0000 (01:41 +0200)]
port enable and reset problem solved (tmp commit)
Bernhard Urban [Fri, 18 Sep 2009 23:14:27 +0000 (01:14 +0200)]
it works now, but we don't know why... *sigh* :(
Bernhard Urban [Fri, 18 Sep 2009 21:56:25 +0000 (23:56 +0200)]
tmp commit
Bernhard Urban [Fri, 18 Sep 2009 20:30:04 +0000 (22:30 +0200)]
roothubports will be configured after init of ohci
theStack [Fri, 18 Sep 2009 20:12:59 +0000 (22:12 +0200)]
tried to fix port enable/reset bug - didn't work
Bernhard Urban [Fri, 18 Sep 2009 19:41:13 +0000 (21:41 +0200)]
some roothub stuff added. TD transfer without errors, w00t!
Bernhard Urban [Fri, 18 Sep 2009 18:50:36 +0000 (20:50 +0200)]
added HC roothub output to isr (only on "RootHubStatusChange")
Bernhard Urban [Fri, 18 Sep 2009 03:06:55 +0000 (05:06 +0200)]
dummyconfig is now static, however control_quirk is still needed. (wtf)
Bernhard Urban [Fri, 18 Sep 2009 00:43:32 +0000 (02:43 +0200)]
add debugfunction for td->flag
finally we get some response from HC :) however our TDs seems to be
bullshit :/
@commit
8dbf7ef007d1d:
I think the problem here was that tailp and headp of the ED structure
was set to the same location. In this case, the HC thinks all TDs are
done! So HC set CLF to null. (search for this somewhere in the ohci specs...)
In fact, just headp must be set.
Bernhard Urban [Thu, 17 Sep 2009 23:46:46 +0000 (01:46 +0200)]
ehm..., something happen! :D
Bernhard Urban [Thu, 17 Sep 2009 23:10:53 +0000 (01:10 +0200)]
so, the HC clears CLF (ControlListFilled bit of the register "Command Status") immediately after setting it.
the ohci specs says:
"This bit is used to indicate whether there are any TDs on the Control
list. It is set by HCD whenever it adds a TD to an ED in the Control
list." [so far so good]
"When HC begins to process the head of the Control list, it checks CLF.
As long as ControlListFilled is 0, HC will not start processing the
Control list. If CLF is 1, HC will start processing the Control list and
will set ControlListFilled to 0. If HC finds a TD on the list, then HC
will set ControlListFilled to 1 causing the Control list processing to
continue. If no TD is found on the Control list, and if the HCD does not
set ControlListFilled, then ControlListFilled will still be 0 when HC
completes processing the Control list and Control list processing will
stop."
What does it mean for us? HC don't find the TD?
Bernhard Urban [Thu, 17 Sep 2009 22:21:13 +0000 (00:21 +0200)]
amend it!
Bernhard Urban [Thu, 17 Sep 2009 21:31:48 +0000 (23:31 +0200)]
new hottie: calloc != memalign. after s/calloc/memalign the HC
don't move HEAD to CURRENT, wtf? :/
Bernhard Urban [Thu, 17 Sep 2009 20:07:14 +0000 (22:07 +0200)]
some debugoutputstuff and few changes
Bernhard Urban [Thu, 17 Sep 2009 17:25:18 +0000 (19:25 +0200)]
[tmp] byte order changes in usb_control_msg() (usb.c). somehow it need
fewer packets (more realistic?). further investigation will be done
soon.
theStack [Wed, 16 Sep 2009 20:15:52 +0000 (22:15 +0200)]
removed decrementer exception message
because it's getting on my nerves while browsing
the host controller output...
theStack [Wed, 16 Sep 2009 19:48:05 +0000 (21:48 +0200)]
first usage of ACCESS_LE throughout the file
it is NOT tested yet, but hey, it compiles ;-)
theStack [Wed, 16 Sep 2009 19:26:40 +0000 (21:26 +0200)]
add macro for u32 little endian access from ppc
Bernhard Urban [Wed, 16 Sep 2009 16:19:51 +0000 (18:19 +0200)]
[tmp] speicherprobleme behoben; in current bleibt der erste endpoint
"haengen"
weiters steht merkuwerdiger weise die adresse (0x80008000) nach
"warmstart" in current -- WTF?
im "done head" leider noch immer nix :( vielleicht ist die endianess
schuld?! (le<>be)
Bernhard Urban [Wed, 16 Sep 2009 16:06:29 +0000 (18:06 +0200)]
[tmp] geht grad nix :(
Bernhard Urban [Wed, 16 Sep 2009 03:47:29 +0000 (05:47 +0200)]
attempt to get some TDs through the HC -> fail :(
theStack [Wed, 16 Sep 2009 02:09:05 +0000 (04:09 +0200)]
happy whitespace hunting in sauter stack
(only files that are relevant for us)
Bernhard Urban [Wed, 16 Sep 2009 01:41:23 +0000 (03:41 +0200)]
some debug stuff. let zeh ohci hack begin! \o/
Bernhard Urban [Wed, 16 Sep 2009 00:29:08 +0000 (02:29 +0200)]
first adaption of 'usbport' by Benedikt Sauter
see http://www.embedded-projects.net/index.php?page_id=186
theStack [Sat, 5 Sep 2009 00:47:31 +0000 (02:47 +0200)]
first adaption of linux ohci irq handler
theStack [Fri, 4 Sep 2009 23:35:26 +0000 (01:35 +0200)]
the whitespace hunter has struck again!
Bernhard Urban [Fri, 4 Sep 2009 23:09:28 +0000 (01:09 +0200)]
sync before write hcca_SRC? else just peanuts
Bernhard Urban [Fri, 4 Sep 2009 22:40:52 +0000 (00:40 +0200)]
ohci0 finally goes in operational mode -- silly confusion with
{set,write}32 *shame*
Bernhard Urban [Fri, 4 Sep 2009 22:20:36 +0000 (00:20 +0200)]
dirty ohci commit for thestack; nicer patch will follow
theStack [Sun, 30 Aug 2009 21:49:57 +0000 (23:49 +0200)]
sha1 patch for ppcskel
Steve Reid's SHA-1 C implementation is used here and slighty modified
for the SHA-1 Controller in Hollywood.
Some simple testcases showed that it is a bit faster as it would be done
in software, especially on a huge amount of data.
However, there is room for improvement :)
Further this patch uses the AHBPROT issue recently found, so Broadway is
able to acces the SHA-1 Controller *directly*.
theStack [Fri, 4 Sep 2009 15:12:41 +0000 (17:12 +0200)]
killed the ohci_init FM_INTERVAL fail
Bernhard Urban [Fri, 4 Sep 2009 07:53:12 +0000 (09:53 +0200)]
lol noobs, how about clearing OHCI0_HC_INT_STATUS?! :)
theStack [Thu, 3 Sep 2009 23:54:33 +0000 (01:54 +0200)]
just commented out unneeded line in irq init
due to the fact that (HW_PPCIRQMASK+0x04 == HW_ARMIRQFLAG),
that write concerns arm irqs and is thus not needed here.
besides that, writing 0 to a flag register seems to be
senseless anyway (what have mini people done here? :P).
Bernhard Urban [Thu, 3 Sep 2009 18:10:10 +0000 (20:10 +0200)]
WIP: irq handler
hw-pic still don't work, but the irq #14 will be cleared...
maybe all hw-ppc-flags should be cleared -- how?!
write32(HW_PPCIRQFLAG, ~0);
don't work :(
Bernhard Urban [Thu, 3 Sep 2009 00:17:32 +0000 (02:17 +0200)]
WIP: irq_handler
Bernhard Urban [Wed, 2 Sep 2009 22:46:29 +0000 (00:46 +0200)]
Merge branch 'isr_test' of git://github.com/theStack/ppcskel into isr_test
Conflicts:
ohci.c
Bernhard Urban [Tue, 1 Sep 2009 16:36:06 +0000 (18:36 +0200)]
WIP: copy irq_handler from mini to ppcskel
theStack [Wed, 2 Sep 2009 15:14:43 +0000 (17:14 +0200)]
untracked all those annoying .d files
theStack [Wed, 2 Sep 2009 14:49:36 +0000 (16:49 +0200)]
added (empty) handling for decrementer exception
theStack [Wed, 2 Sep 2009 14:26:35 +0000 (16:26 +0200)]
fixed dma_addr() macro in ohci.c
theStack [Mon, 31 Aug 2009 19:52:28 +0000 (21:52 +0200)]
implemented simple irq handler, added irq.h
theStack [Mon, 31 Aug 2009 16:44:55 +0000 (18:44 +0200)]
ohci0 interrupt will be thrown - hooray++ \o/
theStack [Mon, 31 Aug 2009 15:51:16 +0000 (17:51 +0200)]
reset interrupt will be thrown - hooray \o/