summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320 (follow)
Commit message (Collapse)AuthorAge
* Do some housekeeping with fat.h and SECTOR_SIZEMichael Sevakis2017-03-12
| | | | | | | | | | | | | | Many includes of fat.h are pointless. Some includes are just for SECTOR_SIZE. Add a file 'firmware/include/fs_defines.h' for that and to define tuneable values that were scattered amongst various headers. Remove some local definitions of SECTOR_SIZE since they have to be in agreement with the rest of the fs code anyway. (We'll see what's in fact pointless in a moment ;) Change-Id: I9ba183bf58bd87f5c45eba7bd675c7e2c1c18ed5
* Sansa Connect: change bootloader linker fileTomasz Moń2016-05-25
| | | | | | | | | | | | | | This change ensures that Sansa Connect bootloader.bin will fit in its flash partition. Fix _flash_sizem calculation, division was not working properly because FLASHSIZE included subtraction and defined value was not in parenthesis. Prior to this change _flash_sizem was 0x00800000, now it is correctly set to 4 in case of Sansa Connect and 8 in case of other TMS320DM320 players. This significantly improves boot time as cache is now enabled only for real flash memory region. Change-Id: If3e50a3075c840dcb69dfafe5bba608a0acd2bf8
* Get rid of stupid _backlight_* function namesMarcin Bukat2015-01-12
| | | | | | _remote_backlight_* and _buttonlight_* are cleaned as well Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
* Rewrite filesystem code (WIP)Michael Sevakis2014-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch redoes the filesystem code from the FAT driver up to the clipboard code in onplay.c. Not every aspect of this is finished therefore it is still "WIP". I don't wish to do too much at once (haha!). What is left to do is get dircache back in the sim and find an implementation for the dircache indicies in the tagcache and playlist code or do something else that has the same benefit. Leaving these out for now does not make anything unusable. All the basics are done. Phone app code should probably get vetted (and app path handling just plain rewritten as environment expansions); the SDL app and Android run well. Main things addressed: 1) Thread safety: There is none right now in the trunk code. Most of what currently works is luck when multiple threads are involved or multiple descriptors to the same file are open. 2) POSIX compliance: Many of the functions behave nothing like their counterparts on a host system. This leads to inconsistent code or very different behavior from native to hosted. One huge offender was rename(). Going point by point would fill a book. 3) Actual running RAM usage: Many targets will use less RAM and less stack space (some more RAM because I upped the number of cache buffers for large memory). There's very little memory lying fallow in rarely-used areas (see 'Key core changes' below). Also, all targets may open the same number of directory streams whereas before those with less than 8MB RAM were limited to 8, not 12 implying those targets will save slightly less. 4) Performance: The test_disk plugin shows markedly improved performance, particularly in the area of (uncached) directory scanning, due partly to more optimal directory reading and to a better sector cache algorithm. Uncached times tend to be better while there is a bit of a slowdown in dircache due to it being a bit heavier of an implementation. It's not noticeable by a human as far as I can say. Key core changes: 1) Files and directories share core code and data structures. 2) The filesystem code knows which descriptors refer to same file. This ensures that changes from one stream are appropriately reflected in every open descriptor for that file (fileobj_mgr.c). 3) File and directory cache buffers are borrowed from the main sector cache. This means that when they are not in use by a file, they are not wasted, but used for the cache. Most of the time, only a few of them are needed. It also means that adding more file and directory handles is less expensive. All one must do in ensure a large enough cache to borrow from. 4) Relative path components are supported and the namespace is unified. It does not support full relative paths to an implied current directory; what is does support is use of "." and "..". Adding the former would not be very difficult. The namespace is unified in the sense that volumes may be specified several times along with relative parts, e.g.: "/<0>/foo/../../<1>/bar" :<=> "/<1>/bar". 5) Stack usage is down due to sharing of data, static allocation and less duplication of strings on the stack. This requires more serialization than I would like but since the number of threads is limited to a low number, the tradoff in favor of the stack seems reasonable. 6) Separates and heirarchicalizes (sic) the SIM and APP filesystem code. SIM path and volume handling is just like the target. Some aspects of the APP file code get more straightforward (e.g. no path hashing is needed). Dircache: Deserves its own section. Dircache is new but pays homage to the old. The old one was not compatible and so it, since it got redone, does all the stuff it always should have done such as: 1) It may be update and used at any time during the build process. No longer has one to wait for it to finish building to do basic file management (create, remove, rename, etc.). 2) It does not need to be either fully scanned or completely disabled; it can be incomplete (i.e. overfilled, missing paths), still be of benefit and be correct. 3) Handles mounting and dismounting of individual volumes which means a full rebuild is not needed just because you pop a new SD card in the slot. Now, because it reuses its freed entry data, may rebuild only that volume. 4) Much more fundamental to the file code. When it is built, it is the keeper of the master file list whether enabled or not ("disabled" is just a state of the cache). Its must always to ready to be started and bind all streams opened prior to being enabled. 5) Maintains any short filenames in OEM format which means that it does not need to be rebuilt when changing the default codepage. Miscellaneous Compatibility: 1) Update any other code that would otherwise not work such as the hotswap mounting code in various card drivers. 2) File management: Clipboard needed updating because of the behavioral changes. Still needs a little more work on some finer points. 3) Remove now-obsolete functionality such as the mutex's "no preempt" flag (which was only for the prior FAT driver). 4) struct dirinfo uses time_t rather than raw FAT directory entry time fields. I plan to follow up on genericizing everything there (i.e. no FAT attributes). 5) unicode.c needed some redoing so that the file code does not try try to load codepages during a scan, which is actually a problem with the current code. The default codepage, if any is required, is now kept in RAM separarately (bufalloced) from codepages specified to iso_decode() (which must not be bufalloced because the conversion may be done by playback threads). Brings with it some additional reusable core code: 1) Revised file functions: Reusable code that does things such as safe path concatenation and parsing without buffer limitations or data duplication. Variants that copy or alter the input path may be based off these. To do: 1) Put dircache functionality back in the sim. Treating it internally as a different kind of file system seems the best approach at this time. 2) Restore use of dircache indexes in the playlist and database or something effectively the same. Since the cache doesn't have to be complete in order to be used, not getting a hit on the cache doesn't unambiguously say if the path exists or not. Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8 Reviewed-on: http://gerrit.rockbox.org/566 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
* Add missing kernel.h includes (hopefully all of them), take #2.Thomas Martitz2014-01-05
| | | | Change-Id: I62cedf992bb096987050621cfc34f0432e9da170
* Add missing kernel.h includes (hopefully all of them).Thomas Martitz2014-01-05
| | | | Change-Id: I9c1825296a788587b8d494d8514b3314847b0ff0
* Cleanup MV/MD macros a little.Michael Sevakis2013-08-17
| | | | | | | | | | When using variadic macros there's no need for IF_MD2/IF_MV2 to deal with function parameters. IF_MD/IF_MV are enough. Throw in IF_MD_DRV/ID_MV_VOL that return the parameter if MD/MV, or 0 if not. Change-Id: I7605e6039f3be19cb47110c84dcb3c5516f2c3eb
* Still at it for 0c7b787. Might be done now.Michael Sevakis2013-04-15
| | | | Change-Id: Idf45731dc6554954747f6036dc6dfcd4b63981a1
* remove debug-target.hRafaël Carré2012-05-07
|
* fix tms320dm320 crt0.SMarcin Bukat2012-04-06
| | | | Change-Id: I7d7304cd4bddea78777ce826495e7cddae711442
* arm: factor all exception handlers out of the crt0.S filesAmaury Pouly2012-04-06
| | | | | | | | | | | Remove the implementations of all exceptions handlers from the various crt0.S files and have a single implementation in system-arm.h The new implementation is weak so that it can be overwritten by some specific code (like the unwinder) Change-Id: Ib3e041ed6037376bbe0e79286057e1051640dd90 Reviewed-on: http://gerrit.rockbox.org/205 Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
* mrobe500: fix warrnig in bootloaderMarcin Bukat2012-03-19
| | | | Change-Id: I327dad2b8f335468d38ff8d717f7885c14492b7e
* Revise the PCM callback system after adding multichannel audio.Michael Sevakis2012-03-03
| | | | | | | | | | | | | | | | | | Additional status callback is added to pcm_play/rec_data instead of using a special function to set it. Status includes DMA error reporting to the status callback. Playback and recording callback become more alike except playback uses "const void **addr" (because the data should not be altered) and recording uses "void **addr". "const" is put in place throughout where appropriate. Most changes are fairly trivial. One that should be checked in particular because it isn't so much is telechips, if anyone cares to bother. PP5002 is not so trivial either but that tested as working. Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2 Reviewed-on: http://gerrit.rockbox.org/166 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Fix build errors and warningsJonathan Gordon2012-02-28
| | | | Change-Id: Ie80bc4328d4f89a5a7b77c93f2b445d0e30fb019
* lcd drivers: Convert lcd_[remote_]framebuffer to a pointerJonathan Gordon2012-02-28
| | | | | | | | | | Change all lcd drivers to using a pointer to the static framebuffer instead of directly accessing the static array. This will let us later do fun things like dynamic framebuffer sizes (RaaA) or ability to use different buffers for different layers (dynamic skin backdrops!) Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
* adc-target.h: cleanupRafaël Carré2012-01-08
| | | | | | | | move adc_close() prototype to adc.h don't duplicate prototypes of adc.h remove license header and guards for a single include of another file or for empty content git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31623 a1c6a512-1295-4272-9138-f99709370657
* button-target.h : move prototypes to button.hRafaël Carré2012-01-08
| | | | | | no need to define BUTTON_REMOTE anymore git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31620 a1c6a512-1295-4272-9138-f99709370657
* Clean spi.h and spi-target.hRafaël Carré2012-01-07
| | | | | | | Only target-specific (list of SPI targets) go in spi-target.h API go into spi.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31615 a1c6a512-1295-4272-9138-f99709370657
* lcd_remote_powersave: unusedRafaël Carré2012-01-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31611 a1c6a512-1295-4272-9138-f99709370657
* mr500: move remote button reading code to buttom-mr500.cRafaël Carré2012-01-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31609 a1c6a512-1295-4272-9138-f99709370657
* move _remote_backlight_* to common headerRafaël Carré2012-01-07
| | | | | | remove unused REMOTE_INIT_LCD / REMOTE_DEINIT_LCD git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31607 a1c6a512-1295-4272-9138-f99709370657
* remote_detect(): move to lcd-remote.hRafaël Carré2012-01-07
| | | | | | Reorganize lcd-remote.h so it works for iaudio-m3 too git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31605 a1c6a512-1295-4272-9138-f99709370657
* move lcd remote common declarations to lcd-remote.hRafaël Carré2012-01-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31604 a1c6a512-1295-4272-9138-f99709370657
* lcd-remote-target.h: remove more duplicatesRafaël Carré2012-01-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31603 a1c6a512-1295-4272-9138-f99709370657
* lcd-remote-target.h: remove duplicate declarationsRafaël Carré2012-01-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31602 a1c6a512-1295-4272-9138-f99709370657
* dbg_hw_info(): remove duplicate prototypesRafaël Carré2012-01-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31560 a1c6a512-1295-4272-9138-f99709370657
* dbg_ports(): remove duplicate prototypeRafaël Carré2012-01-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31558 a1c6a512-1295-4272-9138-f99709370657
* Rework powermgmt to enable code re-use on appliation and sims.Thomas Martitz2012-01-03
| | | | | | | | | | | | | | | | | | | | | * Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application) to break powermgmt.c's assumption about the ability to read battery voltage. There's now additionally percentage (android) and remaining time measure (maemo). No measure at all also works (sdl app). If voltage can't be measured, then battery_level() is king and it'll be used for power_history and runtime estimation. * Implement target's API in the simulator, i.e. _battery_voltage(), so it doesn't need to implement it's own powermgmt.c and other stubs. Now the sim behaves much more like a native target, although it still changes the simulated battery voltage quickly, * Other changes include include renaming battery_adc_voltage() to _battery_voltage(), for consistency with the new target functions and making some of the apps code aware that voltage and runtime estimation is not always available. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
* usb-target.h: removeRafaël Carré2011-12-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31498 a1c6a512-1295-4272-9138-f99709370657
* creative zvm isp1583 defines: move to isp1583.hRafaël Carré2011-12-31
| | | | | | zvm is the only user of this file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31495 a1c6a512-1295-4272-9138-f99709370657
* usb_drv_connected() is declared in usb_drv.hRafaël Carré2011-12-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31490 a1c6a512-1295-4272-9138-f99709370657
* move usb_pin_init() declaration to PP's system-target.hRafaël Carré2011-12-31
| | | | | | | remove duplicate usb_detect() declaration Remove all content from empty usb-target.h files git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31488 a1c6a512-1295-4272-9138-f99709370657
* usb_init_device(): move prototype to usb.hRafaël Carré2011-12-31
| | | | | | Get rid of some usb-target.h files git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31487 a1c6a512-1295-4272-9138-f99709370657
* Sansa Connect: Set unknown GIOs to state with lowest power consumption. This ↵Tomasz Moń2011-12-26
| | | | | | | | | slightly improves runtime. Use proper delay for DSP reset and interrupt. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31438 a1c6a512-1295-4272-9138-f99709370657
* TMS320DM320: Add generic I/O debug window for targets other than mrobe 500.Tomasz Moń2011-12-24
| | | | | | | | | DEBUG_GIO allows users to set any GIO options (direction, output state). As this feature should be used only by experienced users it is compiled conditionally. Raise I2C delay values since udelay() is now precise and previous values seems to be too low for some devices. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31421 a1c6a512-1295-4272-9138-f99709370657
* TMS320DM320: Disable CLOCKOUT signal to save some power.Tomasz Moń2011-12-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31404 a1c6a512-1295-4272-9138-f99709370657
* Sansa Connect: Significantly decrease MIN_YIELD_PERIOD in sdmmc driver.Tomasz Moń2011-12-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31400 a1c6a512-1295-4272-9138-f99709370657
* TMS320DM320: Ensure udelay() will not end before specified amount of time.Tomasz Moń2011-12-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31398 a1c6a512-1295-4272-9138-f99709370657
* TMS320DM320: Check for TIMER1 bit in udelay().Tomasz Moń2011-12-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31394 a1c6a512-1295-4272-9138-f99709370657
* TMS320DM320: Prevent lockup in udelay() when this function is called with ↵Tomasz Moń2011-12-21
| | | | | | interrupts disabled. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31392 a1c6a512-1295-4272-9138-f99709370657
* Sansa Connect: Put DAC (needed for analog video output) in Powerdown mode.Tomasz Moń2011-12-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31391 a1c6a512-1295-4272-9138-f99709370657
* Fix comment in sdmmc to reflect what it really means.Tomasz Moń2011-12-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31390 a1c6a512-1295-4272-9138-f99709370657
* Sansa Connect: Don't enable DAC clock as it's not necessary.Tomasz Moń2011-12-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31389 a1c6a512-1295-4272-9138-f99709370657
* Sansa Connect: Add udelay() in sdmmc card initialization to prevent dead locks.Tomasz Moń2011-12-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31388 a1c6a512-1295-4272-9138-f99709370657
* Sansa Connect: use udelay() in AVR spi_txrx().Tomasz Moń2011-12-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31377 a1c6a512-1295-4272-9138-f99709370657
* TMS320DM320: Use TIMER1 (tick generator) to make udelay() precise.Tomasz Moń2011-12-20
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31376 a1c6a512-1295-4272-9138-f99709370657
* Sansa Connect: Disable EMIF clock after booting main binary. Raise the ↵Tomasz Moń2011-12-20
| | | | | | | | | threshold values for battery dangerous and shutoff levels. On this player EMIF is needed for accessing NOR flash. Disabling it improves battery runtime by about 25 minutes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31373 a1c6a512-1295-4272-9138-f99709370657
* TMS320DM320: Turn on Image Buffer clock on demand (FS #12462)Tomasz Moń2011-12-19
| | | | | | | This improves battery runtime on Sansa Connect by approximately 40 minutes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31358 a1c6a512-1295-4272-9138-f99709370657
* Sansa Connect: Use Image Buffer for screen updates.Tomasz Moń2011-12-19
| | | | | | | This improves framerate update (when uboosted, approximate values) from 151 fps to 911 fps for whole screen update and from 432 fps to 3017 fps for quarter screen update. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31357 a1c6a512-1295-4272-9138-f99709370657
* Add KEEP() around vectors in linker scripts.Boris Gjenero2011-12-18
| | | | | | | | | | | Vectors are needed by the CPU, but they don't need to be accessed by Rockbox. Without the KEEP(), they can be removed when liking with --gc-sections, creating a broken binary without any warnings. This tells the linker to not remove them. It should enable use of --gc-sections for all targets. When not using --gc-sections, this does not change the binary. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31351 a1c6a512-1295-4272-9138-f99709370657