summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* iPod Classic: fix typos / cosmeticCástor Muñoz2016-05-28
| | | | Change-Id: Ic6552dea4b300032875097ef0b885a4ae059f4bc
* iPod Classic: i2c updatesCástor Muñoz2016-05-26
| | | | Change-Id: Ib516f3f52cf619fb44dc1bb6982b635c49f53a8f
* iPod Classic: define USB_STATUS_BY_EVENT and USB_DETECT_BY_REQUESTCástor Muñoz2016-05-26
| | | | Change-Id: I333fe779d8977bf58a579561466ef8872aa4e228
* iPod Classic: use PMU interrupts to detect USB and FWCástor Muñoz2016-05-26
| | | | Change-Id: I9be733e1a943ddeb99335d362f81f74879eeb94b
* iPod Classic: use PMU interrupts to detect accessoriesCástor Muñoz2016-05-26
| | | | | | | | | | | | - Speed auto detection is launched when an accessory is inserted, so the user doesn't need to modify settings to use accessories that operates at different speeds (or when the same accessory is unplugged and plugged again). - UART controller is disabled when no accessory is inserted, not much powersave but everything counts. Change-Id: If20c3617c2a87b6277fd7e0270031030c44fa953
* iPod Classic: use PMU interrupts to detect hold switchCástor Muñoz2016-05-26
| | | | | | | Finally the hold switch workaround is removed and it is detected in the same way as OF does. Change-Id: Iceac6ca48ffd131b8ee9f62ffdc2b3e30eb02042
* mkimxboot: remove code for NWZ-370/380Amaury Pouly2016-05-25
| | | | | | | | Since the stub code is shared with NWZ-360, it enables the pullup for the hold button, but the NWZ-370/380 doesn't have a hold button so don't compile this code in, it could potentially have unexpected effets or increase consumption Change-Id: I28c8aa40fc7f9373593ff105fb6df557a6f57ccd
* mkimxboot: make cross compiler for dualboot stubs overridableAmaury Pouly2016-05-25
| | | | Change-Id: I90d2048f622b355eae7091e536b940b2ac828583
* 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
* Use an actually reliable method to determine 32 vs 64 bitFrank Gevaerts2016-05-25
| | | | Change-Id: Idba256ae66e67efa7a03f3817bc588e0b4ccd4ba
* iPod Classic: introduce PMU interruptsCástor Muñoz2016-05-25
| | | | | | | | | | PMU interrupts are used to detect USB Vbus, wall adaptor, accessories and holdswitch. A thread is needed to poll the PMU throught I2C, ATM it does nothing but showing the state of the inputs on the HW debug menu, funcionallity for each individual input will be added in next patches. Change-Id: If93bf2044d1052729237a7fd1431c8493e09f1c7
* iPod Classic: rework on external interruptsCástor Muñoz2016-05-25
| | | | Change-Id: I5be450adeb12b16070d9bfa31503e2ef350b2981
* iPod Classic: HW initialization for RBCástor Muñoz2016-05-25
| | | | | | | Do not rely on a bootloader initializing the HW, RB initializes and configures GPIO, I2C, and PMU at startup. Change-Id: If7f856b1f345f63de584aa4e4fc22d130cd66c80
* iPod Classic: piezo support for bootloaderCástor Muñoz2016-05-25
| | | | | | | | Low level functions that do not depend on Rockbox kernel, intended to be used by the bootloader, dualboot-installer, RB drivers or other .dfu tools. Change-Id: If80214d26e505265ace19d9704f1e1300f98b2f4
* iPod Classic: LCD init sequences for bootloaderCástor Muñoz2016-05-25
| | | | Change-Id: I27b7d5fea3164df8d85f7d431dc5301e8cee123d
* iPod Classic: HW preliminary initialization for bootloaderCástor Muñoz2016-05-25
| | | | | | | | | | | When the bootloader starts, most of HW never has been initialized. This patch includes all code needed to perform the preliminary initialization on SYSCON, GPIO, i2c, and MIU. The code is based on emCORE and OF reverse engineering, ported to C for readability. Change-Id: I9ecf2c3e8b1b636241a211dbba8735137accd05c
* bootloader/common: disable unused broken codeCástor Muñoz2016-05-25
| | | | | | | Disable (probably old) broken code, this fixes bootloader builds when ROCKBOX_HAS_LOGF is used. Change-Id: Id0ed2c3368855e2d2d2dbfb18149b9ed81c10b95
* regtools: add headergen_v2Amaury Pouly2016-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new header generator works differently from the previous one: - it uses the new format - the generated macro follow a different style (see below) - the generated macro are highly documented! - it supports SCT-style platform or RMW-style ones Compared to the old style, the new one generate a big set of macros per register/field/enum (loosely related to iohw.h from Embedded C spec). The user then calls generic (names are customizable) macros to perform operations: reg_read(REG_A) reg_read(REG_B(3)) reg_read_field(REG_A, FIELD_X) reg_read_field(REG_B(3), COOL_FIELD) reg_write(REG_A, 0x42) reg_write_field(REG_A, FIELD_X(1), FIELD_Y(3), IRQ_V(FIQ)) reg_write_fielc(REG_B(3), COOL_FIELD_V(I_AM_COOL), BLA(42)) the following use RMW or SET/CLR variants, depending on target: reg_set_field(REG_A, FLAG_U, FLAG_V) reg_clr_field(REG_A, FIELD_X, FIELD_Y, IRQ) reg_clr_field(REG_B(3), COOL_FIELD, BLA) the following does clear followed by set, on SET/CLR targets: reg_cs(REG_A, 0xff, 0x42) reg_cs(REG_B(3), 0xaa, 0x55) reg_cs_field(REG_A, FIELD_X(1), FIELD_Y(3), IRQ_V(FIQ)) reg_cs_field(REG_B(3), COOL_FIELD_V(I_AM_COOL)) The generator code is pretty long but has lots of documentation and lots of macro names can be customized. Change-Id: I5d6c5ec2406e58b5da11a5240c3a409a5bb5239a
* iPod Classic: modify USB storage read/write buffers sizeCástor Muñoz2016-05-15
| | | | | | | | | The write buffer size is undefined to use the default 24Kb. size defined (and recomended) in usb_storage.c, the read buffer size is also decremented to 24 Kb. USB sequential read and write benchmarks using diskdump are now 8-9% faster. Change-Id: Ia7c9f77b57c8ca5b566b508efffbd713d1587acf
* iPod Classic: wait for ATA power down on device shutdownCástor Muñoz2016-05-15
| | | | Change-Id: I5d3d19d6d0c937e11e28b99f34d729631051ab93
* iPod Classic: optimize UDMA timming for ATA drivesCástor Muñoz2016-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch optimizes UDMA timings to increase write transfer rate on ATA bus, these transfers are clocked by HCLK, tDVS+tDVH is modified to decrease Tcyctyp (typical write cycle period). This is not overclocking, we meet the ATA standar, the settings used by OF are not well optimized for each UDMA mode, we will never know but probably this was due some documentation issue. ATA_UDMA_TIME register is documented on s3c6400 datasheet, information included in s5l8700 datasheet is wrong or not valid for s5l8702. From ATA specs, (Minimum, Maximum) values in nanoseconds: UDMA 0 UDMA 1 UDMA 2 UDMA 3 UDMA 4 tACKENV (20, 70) (20, 70) (20, 70) (20, 55) (20, 55) tRP (160, --) (125, --) (100, --) (100, --) (100, --) tSS (50, --) (50, --) (50, --) (50, --) (50, --) tDVS (70, --) (48, --) (31, --) (20, --) (6.7, --) tDVH (6.2, --) (6.2, --) (6.2, --) (6.2, --) (6.2, --) tDVS+tDVH (120, --) (80, --) (60, --) (45, --) (30, --) Tcyc = tDVS+tDVH WR[bytes/s] = 1/Tcyc[s] * 2[bytes] On Classic (boosted): HClk = 108 MHz. -> T = ~9.26 ns. Old values (used by OF): UDMA ATA_UDMA_TIME tACK tRP tSS tDVS tDVH Tcyc WR(MB/s) 0 0x5071152 27.8 166.7 55.6 74.1 55.6 129.7 15.4 1 0x3050a52 27.8 101.8 55.6 55.6 37 92.6 21.6 2 0x3030a52 27.8 101.8 55.6 37 37 74 27 3 0x2020a52 27.8 101.8 55.6 27.8 27.8 55.6 36 4 0x2010a52 27.8 101.8 55.6 18.5 27.8 46.3 43.2 New values: UDMA ATA_UDMA_TIME tACK tRP tSS tDVS tDVH Tcyc WR(MB/s) 0 0x4071152 27.8 166.7 55.6 74.1 46.3 120.4 16.6 1 0x2050d52 27.8 129.6 55.6 55.6 27.8 83.4 24 2 0x2030a52 27.8 101.8 55.6 37 27.8 64.8 30.9 3 0x1020a52 27.8 101.8 55.6 27.8 18.5 46.3 43.2 4 0x1010a52 27.8 101.8 55.6 18.5 18.5 37 54 To verify that the settings are correct, a write-to-cache test was performed using emCORE, the measured transfer rate (WRm) is compared against the theoric transfer rate (WR) at 108 Mhz for the old and the new UDMA4 settings (iPod 160, HDD Toshiba MK1634GAL): UDMA ATA_UDMA_TIME Tcyc(ns) WR(MB/s) WRm(MB/s) RDm(MB/s) 4 0x2010a52 46.3 43.2 42.9 59.8 4 0x1010a52 37 54 53.5 59.8 Notes: - The new UDMA4 settings increases ~25% the ATA transfer rate for cached-writes. The real HDD write speed is limited by the internal transfer rate (depends on cilinder, for the MK1634GAL it is 276 to 573 Mbits/s). Sequential write benchmark using diskdump on USB are ~8% faster. - Read transfers are clocked by the device, it depends on UDMA mode selected and are not affected by HClk or ATA_UDMA_TIME settings. Read-from-cache tests results (RDm) using HClk=108 and HClk=54 for UDMA4 are 59.8 MB/s on MK1634GAL. - Minimum HClk is limited by tACKENV specs, using current settings it is 54 MHz for UDMA4,UDMA3 and 43 MHz for UDMA2,UDMA1,UDMA0. Change-Id: I61d67060410752518a59e1ff08072b21747ca997
* iPod Classic: remove ATA_HAVE_BBTCástor Muñoz2016-05-15
| | | | Change-Id: I45e26a413c13e401164a01996b0b4c6788096a7f
* iPod Classic: remove emCORE HDD endianess warningCástor Muñoz2016-05-15
| | | | Change-Id: I91aa2dca7e748fe043c16014661985c42ab84b1a
* iPod Classic: prepare i2c and PMU for bootloaderCástor Muñoz2016-05-15
| | | | | | | | | | | | | When the bootloader starts only IRAM is available, the first task is to ask the PMU to verify if the iPod has previously been hibernated by OF. Due to memory limitations, the kernel cannot be used on this stage. This patch modifies I2C and PMU low level functions to not to depend on kernel (removes mutexes, and uses HW timer instead of current_tick), actual kernel functions are modified to be 'mutexed' wrappers of the new functions. Change-Id: I7cef9e95dedaf176dc0659315f3dc33166d5b116
* iPOd Classic: skip emCORE HDD endianness warning for bootloaderCástor Muñoz2016-05-15
| | | | Change-Id: I274511cc1061c396a0642e8496d46a3b9c1228d3
* dx90: fix spurious button eventsAmaury Pouly2016-05-14
| | | | | | | | | The kernel on this device reports nonexistent key presses, in particular it reports right presses when pressing the left button... Since when it happens, the right press comes after the left one, the new code simply ignores any right press when the left button in pressed. Change-Id: Ib6ced02682d9cecf4c7f6c58834907a667419cd7
* Manually unboost if not using boost in test_codecMichael Giacomelli2016-05-14
| | | | | | | | Right now GUI boost interfers with test_codec running unboosted by varying the CPU frequency. This at least makes it more consistent if run without user input. Change-Id: I121615098d6bd72ccd13c4e665cc2e4d45d7b58c
* iPod Nano2G: add IPOD_ACCESSORY_PROTOCOLCástor Muñoz2016-05-14
| | | | Change-Id: I78a19972624504bc802d96b9b8e9cec132164c2c
* configure: statically link sdl on win32 cross compileAmaury Pouly2016-05-13
| | | | Change-Id: If9115da0470e2c301589329af67433f7260d24d3
* iPod Nano2G: add HAVE_SERIALCástor Muñoz2016-05-13
| | | | Change-Id: I46dca69c6708d3e6189f66e70badf0a594bac00b
* Add UART suuport for s5l8700 and s5l8701Cástor Muñoz2016-05-13
| | | | | | | | | Add UART support for s5l8700/1 using the UC870X UART controller, actually the functionallity is disabled and must be enabled for each individual target. Tested on iPod Nano 2G (s5l8701), not tested on s5l8700. Change-Id: Ic0f216bb871502d355a70e4b658e536a2c0976a9
* iPod Classic: updates for uc8702 driverCástor Muñoz2016-05-13
| | | | | | | | | | - Small rework on the UC8702 UART controller to make it compatible with other s5l870x SOCs. Files moved and renamed, many conditional code added to deal with capabilities and 'features' of the different CPUs. - A couple of optimizacions that should not affect the functionality. Change-Id: I705169f7e8b18d5d1da642f81ffc31c4089780a6
* Reverting 4327cbc9b8886eMihail Zenkov2016-05-04
| | | | | | I do testing incorrectly: fix don't work as expected. Change-Id: Ie32672ec213861c02295ae0a14e22b9ca9035585
* C2X0v2: use GPIO to check button state in dualbootMihail Zenkov2016-05-03
| | | | | | | C240v2 freeze on booting OF if SD card inserted. Use GPIO instead DBOP should help. Change-Id: Idec0028040f91c6d2c7c04327ca0e1af204f58eb
* Update runtime estimation after recent power optimizations.Michael Giacomelli2016-04-22
| | | | | | | Values taken from Mihail's Clip Zip, should be similar on all AMSv2 devices. Change-Id: I9432ecffea94afae224391a86f1d3fa46cd87bc0
* Fix AMSv2 variant 1 detection if rockbox loaded from SD cardMihail Zenkov2016-04-22
| | | | Change-Id: Ie7c9c06170601e109f8d3de9686773c38a6e224a
* AMS: enable SD card support in bootloaderMihail Zenkov2016-04-20
| | | | | | | With this changes rockbox can be loaded from SD card when internal storage can't be mount (due to hardware or software problem). Change-Id: I32b20d3f341566364def747a708a54ba6b4a7f8b
* Manual: Add missing pluginsSebastian Leonhardt2016-04-15
| | | | | | | | | | | | | | | | | | | | The text is usually only a short description taken from the wiki and don't contain screenshots or keymaps, but should be better than nothing. :) Added manual entries: - Boomshine - Dict - FFT - main_menu_config - Matrix - Maze (including keymap) - PDbox - Superdom Additional changes/fixes: - fix "Clix" alphabetical order - add Frotz & ZXBox to games preamble Change-Id: I169870420cbac8123695747ccfcbaaf3478c11cc
* AMSv2: enable voltage scalingMihail Zenkov2016-04-13
| | | | Change-Id: I8d64b8578d28884e326f8b43100b3b4691f95acf
* jz4670_tools: add usbboot tool, tweak Makefile and packtoolAmaury Pouly2016-04-08
| | | | | | | | | Although the jz4740 contains a similar tool to usbboot, its command-line interface is not very useful, also it does not compile by default because it relies on some external code, and it contains code specific to some JZ4740 devices. Change-Id: I22688238d147e21fb0fd524466b333b6003d4ff1
* hwstub: remove the old libraryAmaury Pouly2016-04-08
| | | | Change-Id: I94d0f67cfd0d636407cd9cf3afbe0db4064de28e
* qeditor: port to the new hwstub library and add featuresAmaury Pouly2016-04-08
| | | | | | | | | This commit adds support for the version of the hwstub library, which requires a lot of changes. It also adds some editing features, such as register access and much better editing of fields using the mouse (double click on a field to be able to resize and move it). Change-Id: I3c4e4cc855cb44911c72bc8127bad841b68efe52
* regtools: add register access to soc descAmaury Pouly2016-04-08
| | | | | | | | | | | Registers (and variants) can now specify the type of access supported: - unspecified: for variant means same as register, for register defaults R/W - read/write - read only - write only Backward compatibility is preserved by setting access to unspecified by default. Change-Id: I3e84ae18f962a45db62f996a542d08405d05b895
* hwstub: port hwstub_shell to the new libraryAmaury Pouly2016-04-08
| | | | | | | | | | | | | | | Also use this opportunity to cleanup support for multiple devices: the shell now supports dynamic changes in the device and will call init() everytime a new device is selected, to prepare a new environment. The shell now honors register width on register read/write. The shell also provides access to variants as follows by creating a subtable under the register using the variant type in UPPER case and having the same layout as a register. For example if register HW.GPIO.DIR has variants "set" and "clr", those can be used like this: HW.GPIO.DIR.SET.write(0xff) HW.GPIO.DIR.CLR.write(0xff00) Change-Id: I943947fa98bce875de0cba4338e8b7196a4c1165
* hwstub: port hwstub_load to the new libraryAmaury Pouly2016-04-08
| | | | Change-Id: I7e8ae50907401a9480a0da809a4470f1728d3a57
* hwstub: rewrite and expand libraryAmaury Pouly2016-04-08
| | | | | | | | | | | | | Rewrite the hwstub library in C++, with a clean and modular design. The library was designed from the ground up to be aware of multithreading issues and to handle memory allocation nicely with shared pointers. Compared to the original library, it brings the following major features: - support for JZ boot devices, it is very easy to add support for others - support for network transparent operations (through sockets): both tcp and unix domains are support Change-Id: I75899cb9c7aa938c17ede2bb3f468e7a55d625b4
* soc_desc: add default constructors to most structuresAmaury Pouly2016-04-08
| | | | | | | After being caught by several bugs of the type "let's forgot to initialize a field to default value", I'm finally fixing this. Change-Id: I01c33e0611d4f697f767db66465e4fb30858cdab
* Plugin 2048: Optimize for 128x96 screenSebastian Leonhardt2016-04-07
| | | | Change-Id: I47c2d857fbf9e53696e005b075d8a6f041738fe3
* Fix (D)EBUG compilationMihail Zenkov2016-04-07
| | | | Change-Id: I5cb6d9ec3d14389b03ae43edb15b9c6199df322b
* AMS: power off while charging enabledMihail Zenkov2016-04-07
| | | | Change-Id: Icddf1ea0a03f0426e0cf9b99f05ea065f532fed5