Age | Commit message (Collapse) | Author |
|
Change-Id: I5be450adeb12b16070d9bfa31503e2ef350b2981
|
|
Do not rely on a bootloader initializing the HW, RB initializes
and configures GPIO, I2C, and PMU at startup.
Change-Id: If7f856b1f345f63de584aa4e4fc22d130cd66c80
|
|
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
|
|
Change-Id: I27b7d5fea3164df8d85f7d431dc5301e8cee123d
|
|
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
|
|
Disable (probably old) broken code, this fixes bootloader builds
when ROCKBOX_HAS_LOGF is used.
Change-Id: Id0ed2c3368855e2d2d2dbfb18149b9ed81c10b95
|
|
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
|
|
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
|
|
Change-Id: I5d3d19d6d0c937e11e28b99f34d729631051ab93
|
|
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
|
|
Change-Id: I45e26a413c13e401164a01996b0b4c6788096a7f
|
|
Change-Id: I91aa2dca7e748fe043c16014661985c42ab84b1a
|
|
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
|
|
Change-Id: I274511cc1061c396a0642e8496d46a3b9c1228d3
|
|
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
|
|
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
|
|
Change-Id: I78a19972624504bc802d96b9b8e9cec132164c2c
|
|
Change-Id: If9115da0470e2c301589329af67433f7260d24d3
|
|
Change-Id: I46dca69c6708d3e6189f66e70badf0a594bac00b
|
|
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
|
|
- 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
|
|
I do testing incorrectly: fix don't work as expected.
Change-Id: Ie32672ec213861c02295ae0a14e22b9ca9035585
|
|
C240v2 freeze on booting OF if SD card inserted. Use GPIO instead DBOP should
help.
Change-Id: Idec0028040f91c6d2c7c04327ca0e1af204f58eb
|
|
Values taken from Mihail's Clip Zip, should be similar
on all AMSv2 devices.
Change-Id: I9432ecffea94afae224391a86f1d3fa46cd87bc0
|
|
Change-Id: Ie7c9c06170601e109f8d3de9686773c38a6e224a
|
|
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
|
|
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
|
|
Change-Id: I8d64b8578d28884e326f8b43100b3b4691f95acf
|
|
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
|
|
Change-Id: I94d0f67cfd0d636407cd9cf3afbe0db4064de28e
|
|
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
|
|
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
|
|
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
|
|
Change-Id: I7e8ae50907401a9480a0da809a4470f1728d3a57
|
|
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
|
|
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
|
|
Change-Id: I47c2d857fbf9e53696e005b075d8a6f041738fe3
|
|
Change-Id: I5cb6d9ec3d14389b03ae43edb15b9c6199df322b
|
|
Change-Id: Icddf1ea0a03f0426e0cf9b99f05ea065f532fed5
|
|
Change-Id: I5ddb6e6b4f84e036a7464b142fa9496446708beb
|
|
Change-Id: I8e7ccbcf8a856bc3e08145a795695fb675794495
|
|
Change-Id: Iaec43120ef213d9a3c77201bdf50ebbedd1c5b76
|
|
Interrupts version is cause of freeze on USB extraction.
Also non-interrupts version much simpler and faster.
Change-Id: I30a2993cdcaa85abfba77ca06bfacd5b6b4353e2
|
|
Change-Id: I53b9a129679fd7b322770025106ef92033226d2a
|
|
Fix log file corruption if we have new messages at dumping log to file. Comment
removed as it incorrect. We store all messages in direct order (last message at
end of file).
Change-Id: I4acfa8a0935cc41a889e08f6bc42974fefd1ade2
|
|
without HD
Change-Id: I9b9bbf0568de9a82107b0be3b42c3fdba0a0a27d
|
|
Change-Id: I10aac94906607a74f05a687cb3d0029cb6faea6e
|
|
Change-Id: Ic1ba0c7c7883aae43100c67235dbc2db83056fe7
|
|
Some targets can only use storage DMA if the memory location is storage
aligned. The required alignment can be more strict than word alignment,
which was used previously. This change ensures that aligned transfers
in test_disk can use DMA.
Change-Id: I605b4d57f9e9c04920587017032f14449645693a
|
|
This changes JPEG fill and invalid byte handling to be like
mozjpeg, and bases entropy data start on SOS marker location.
Thanks to Stefan Waldmann and Dean Tersigni for reporting.
Change-Id: I3c79cc6ac8d714fdc75c12b57ba427d611c99519
Chaange-Id: Ibc7c17d38d5be63642bdaf6adfd6acc2a6cf4450
|