Commit graph

7644 commits

Author SHA1 Message Date
Amaury Pouly
be6fba009b usb-as3525v2:
- forgot a ccu undocumented thing in init
- finish init code (following linux patch)
- enable interrupts
- don't use dynanmic fifo sizing by default
- move to a more static configuration of usb hardware parameters (it might be necessary to move them to config* files later).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26195 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 14:54:32 +00:00
Rafaël Carré
24aeac2a75 disk/file: Do not use & on arrays
it might be valid C but is confusing, and not consistent with the rest of file.c

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26191 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 12:59:12 +00:00
Rafaël Carré
ddecf431e0 fuzev2: charging curve and voltage limits
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26190 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 12:53:20 +00:00
Marcin Bukat
6b5fc853b6 fix comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26189 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 12:12:27 +00:00
Marcin Bukat
f28187074b HD200 - increase sligtly wait states for lcd. This removes clicks in playback and lcd updates are fast anyway
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26188 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 12:05:24 +00:00
Marcin Bukat
2d0d08220f HD200 - fix button readings afrer PLL settings change
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26186 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 10:13:14 +00:00
Marcin Bukat
1102edb8f6 HD200 - fix PLL settings. This fixes looong standing bug heavily affecting performance
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26185 a1c6a512-1295-4272-9138-f99709370657
2010-05-20 08:24:04 +00:00
Michael Sevakis
9594f86c1a Gigabeat S: Use longer battery filter; lag is not a problem with voltage for charging since it's I-controlled. Initialize local copy of last_inputs for the power routines in target init otherwise the battery filter is reinitialized too soon.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26180 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 23:39:59 +00:00
Rafaël Carré
29e70dfcb8 sd-as3525v2: masked interrupts and block size won't change, and DMA won't be disabled, so we can just set these in the controller init once for all
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26179 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 20:41:47 +00:00
Rafaël Carré
6b46cc08ed as3525: hide our UNCACHED_ADDR from usb_storage.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26178 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 18:13:06 +00:00
Rafaël Carré
2e188a4dad revert part of r26176 to avoid large static allocation
we still need to convert uncached addresses to physical addresses

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26177 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 18:08:32 +00:00
Rafaël Carré
bae0756acf as3525: don't use IRAM for usb, and avoid usb storage using uncached addresses behind our back
No need for special address handling, all addresses are equal to their physical address

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26176 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 17:56:47 +00:00
Thomas Martitz
0b28594036 Revert r26060. A better fix was found. The acceleration should be fixed once for all now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26175 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 17:34:12 +00:00
Rafaël Carré
9c774b3849 as3514.c: clean up
- enhance registers description in header file with respect to the as3543
registers: point which one are present or not in the as3543, which bits
change (i didn't detail all registers)
- cache less registers, only up to the ones which are written to
  multiple times
- use ascodec_readbytes() to cache all needed registers in a row
- separate the as3543 bits from as3514/as3515 in audiohw_preinit()
- comment out unused audiohw_set_lineout_vol
- some cosmetics

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26174 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 17:30:38 +00:00
Tobias Diedrich
12af4986b9 Handshake still grinds to a halt at some point, but it works better now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26167 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 15:43:53 +00:00
Rafaël Carré
6c8269bc3f fix previous commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26166 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 14:41:56 +00:00
Rafaël Carré
8e12292e75 better preprocessor conditions for enabling GPIOA interrupt
it's only needed if we hotswap the µSD or if we build the fuzev2
scrollwheel code without irq (which we don't do anyway)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26165 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 14:30:34 +00:00
Rafaël Carré
627baea953 sd-as3525: wait 100µs before disabling SD clocks
test_disk doesn't freeze anymore when closing the file between writing & reading

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26164 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 14:06:13 +00:00
Rafaël Carré
54f08f3ab1 as3525v2: fix end of charge detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26163 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 14:06:08 +00:00
Rafaël Carré
b3a8170afe sd-as3525: avoid division when calculating current bank, we only deal with 1 or 2 banks
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26161 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 12:11:57 +00:00
Rafaël Carré
6f2afd36bc as3525: reorder vectored interrupts
The list is ordered by priority, put the DMA and SD interrupts at
the top

This seems to fix the random freezes on heavy storage operation like
building database or pictureflow cache

The recently added audio interrupt had a priority higher than SD slot on
as3525v1, give it a lower priority

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26160 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 12:11:54 +00:00
Rafaël Carré
a53785911a sd-as3525: give timeout in HZ units, not in ticks
remove a TODO fixed in r26029

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26159 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 12:11:50 +00:00
Marcin Bukat
38136345f6 HD200 - lm339 response time is at best 300 ns so adcclk can not be too high
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26158 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 09:29:20 +00:00
Amaury Pouly
cc61f03915 as3525v2: add partial usb init code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26157 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 08:33:50 +00:00
Michael Sevakis
3356effcdf Gigabeat S: Wrong thing messing with IPU_CONF. No fiddling is needed just yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26155 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 00:42:55 +00:00
Michael Sevakis
54c649697b Gigabeat S: Implement LCD contrast, invert and flip modes. Enhance LCD power management. Include init data but it's not needed yet (identical to Gigabeat F).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26154 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 23:50:00 +00:00
Rafaël Carré
8fe22bd4b8 as3525v2: show adc channels in the debug menu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26150 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 20:01:49 +00:00
Rafaël Carré
4f61e455a2 Fuzev1: calibrated charging curve
Show all the adc channels in the IO ports debug menu (not for as3525v2
since the channels are different)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26149 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 19:44:40 +00:00
Rafaël Carré
4d510761cd Clip+: reboot on USB insert
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26148 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 18:51:46 +00:00
Rafaël Carré
147447a284 don't let logf() and DEBUGF() be empty statements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26146 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 18:32:21 +00:00
Tobias Diedrich
0f6b5f03d9 Enable/disable second pll dynamically on usb plugin/remove.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26145 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 16:23:11 +00:00
Rafaël Carré
681cedb4d8 Build overlay plugins for all targets with PLUGIN_BUFFER <= 0x10000 bytes
Bring Clipv1 & m200v4 plugin buffer down to this limit
zxbox, chessbox and rockboy build on the clip
rockboy doesn't build on m200v4 due to not enough buttons to make a keymap
Some gameboy roms won't run on Clipv1: tetris does but not pokemon for example

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26144 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 14:14:53 +00:00
Rafaël Carré
f8f3fab62c as3525 usb: build as3525v2 file based on CONFIG_USBOTG, and fix warnings
build it on fuzev2 and clipv2 too, it should be the same controller
as3525v1 file is only build for CONFIG_USBOTG == USBOTG_AS3525, no need
to check for it in the .c file

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26142 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 12:56:14 +00:00
Rafaël Carré
a01422c54b plugins: changes for targets with small plugin buffer (Clipv1)
- only enable overlays for targets with very small plugin buffer (<=
  0x10000 bytes, i.e. archos)
- change the condition for rockboy to reflect exactly why it can be
  built or not
- Some plugins need a large plugin buffer, only enable them if the
  buffer is big enough (sizes measured on Clipv1)
- disable MIDI if we have 2MB (or less), we won't be able to load the
  instruments in the audio buffer
- remove unusable lua overlay loader
- sokoban code is bigger on clipv1 than on SH, assume it code is 20kB on
  anything but SH so it builds with buffer smaller than 192kB
- reduce the Clipv1 plugin buffer size from 288kB to 96kb, disabling
  zxbox, chessbox, and fft

zxbox and chessbox have overlays which run on archos, we just need to
enable them on other targets. We'll also be able to run rockboy.

fft won't run as it needs a large plugin buffer for greylib

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26141 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 12:46:53 +00:00
Marcin Bukat
b627106392 HD200 - change how adc is scanned (inspired by amiconn)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26138 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 12:29:21 +00:00
Thomas Martitz
6cbc701d2a Rename sdl lcd initialization to (remote_)lcd_init_device which enables removing two #ifdef SIMULATOR and makes it happen as on target.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26137 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 12:27:20 +00:00
Amaury Pouly
c3333b63e2 config: revert an embarrassing change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26133 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 10:04:32 +00:00
Amaury Pouly
22cfbee274 as3525v2: add usb driver stub, enable usb phy&core init
clip+: add USBOTG_ define and enable usb stack

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26132 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 09:58:52 +00:00
Tobias Diedrich
ed96c935ec Ok, this time I double-checked for warnings...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26131 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:27:04 +00:00
Tobias Diedrich
3bb2afc741 And don't forget the return values...
Note to self: Next time don't forget to check a AMSv2 build before committing...


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26130 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:24:54 +00:00
Tobias Diedrich
e36cfed9bf And of course the stubs still need to be there...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26129 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:20:12 +00:00
Tobias Diedrich
ecdbab95f4 Obviously this should not be built on AS353x...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26128 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:08:55 +00:00
Tobias Diedrich
4a8c05e92f This change wasn't supposed to be in there yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26127 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:07:10 +00:00
Tobias Diedrich
922f83e647 Not quite working yet, but almost.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26126 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:00:57 +00:00
Thomas Martitz
7b3299d681 A bit further cleanup in system-sdl.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26123 a1c6a512-1295-4272-9138-f99709370657
2010-05-17 22:03:51 +00:00
Rafaël Carré
66f183077d Clip+: boot to OF if USB is connected
To be sure that there is no mistake in this code, it is run *after*
the known to work HOME & LEFT buttons checks, unlike other Sansas

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26122 a1c6a512-1295-4272-9138-f99709370657
2010-05-17 21:57:46 +00:00
Thomas Martitz
60741f2b0d Fix another warning which strangely only occurs on cygwin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26121 a1c6a512-1295-4272-9138-f99709370657
2010-05-17 21:51:46 +00:00
Thomas Martitz
86e19dd65d Restore changes of r25809 that got lost in the target tree movement and fix simulator build on cygwin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26120 a1c6a512-1295-4272-9138-f99709370657
2010-05-17 21:43:06 +00:00
Rafaël Carré
7dd0297a4d as3525: correctly detect usb status if we boot with USB plugged
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26118 a1c6a512-1295-4272-9138-f99709370657
2010-05-17 21:17:46 +00:00
Rafaël Carré
88c55d7290 as3514/as3543 fixes
- Enable end of charge monitoring once, it doesn't need to be disabled
- Acknowledge the first (wrong) end of charge interrupt on charger enable
  (this had been broken in r25299)
- Centralize reads to ENRD* registers and cache the results when needed
    - on PP it is not needed because reads are atomic, we only check for
      end of charge when the charging, and for charger presence when
      discharging

as3525v2 (using as3543) specifics
- I got the datasheet today from AMS, thanks to them for being so fast
  and not require me to sign tons of papers!
- USB detection now works on as3525v2 using the as3543. Clip+ won't
  reboot to OF yet, it needs mkamsboot support first (usbstack disabled)
- Charging should work, the CHARGER register is at a different place, it
  is an extended PMU register -> use ascodec_read/write_charger() to
  access it
- real interrupts are not used yet for ENRD, we get thousands of
  interrupts per second, apparently only limited by the i2c clock.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26116 a1c6a512-1295-4272-9138-f99709370657
2010-05-17 20:53:25 +00:00