This is related to gdb, and gdb can only work on SH and ifp
This was mistakenly kept when app.lds was forked for each SoC
Side-effect: fix DEBUG builds when the rockbox binary is expected to
be loaded at the start of DRAM and there is no runtime relocation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28124 a1c6a512-1295-4272-9138-f99709370657
IN & OUT interrupts have not much in common so move each to its own
function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28043 a1c6a512-1295-4272-9138-f99709370657
- reorder members (largest members first)
- int status -> int8_t status (we only use 0 or -1)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28042 a1c6a512-1295-4272-9138-f99709370657
- use a single table to store endpoints numbers (1 table by direction)
- drop __ prefix since the table isn't meant to be hidden (it is used in
reset_endpoints()
- the tables won't change at runtime: mark const
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28038 a1c6a512-1295-4272-9138-f99709370657
set status to failure before signaling usb_drv_send_nonblocking() in
reset_endpoints()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28037 a1c6a512-1295-4272-9138-f99709370657
Use ep0_setup_pkt as a pointer
Fix comment for CGU_USB clk source
Remove comment about physical address, the macro handles that for us
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28035 a1c6a512-1295-4272-9138-f99709370657
Since we'll receive data from DMA in this buffer we don't need to write-back
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28032 a1c6a512-1295-4272-9138-f99709370657
- don't use *_dcache_range() on uncached memory
- remove unused struct endpoint->buffer
- use correct *_dcache_range() in usb_drv_transfer() for each direction
- halve FIFO size
sometimes mounts / sometimes fails
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28031 a1c6a512-1295-4272-9138-f99709370657
- implement request_endpoint
- setup nextep chain for in endpoints
- remove useless dcache operation on IN transfer completion
- fix transfers to use correct max packet size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28028 a1c6a512-1295-4272-9138-f99709370657
- use uncached address to access setup packet
- implement driver exit
- stop forcing full speed
- change fifo sizes on init
- don't call invalid_dache() on setup packet because it makes everything fail
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28027 a1c6a512-1295-4272-9138-f99709370657
FCLK is unused because we use fastbus clocking: CPU clock = PCLK
Base PCLK off PLLA and use the lowest frqeuency for FCLK (24MHz source,
maximum divider)
Save a bit of power, adjust Clipv1/e200v2/Fuzev1 current usage accordingly
Note: the power saving (in mA) is a bit less on e200v2/Fuzev1 than on Clipv1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28000 a1c6a512-1295-4272-9138-f99709370657
- change buffer alignement to 32 bytes (not sure if it's useful)
- flush rx fifo on reset
- use AS3525_PHYSICAL_ADDR for DMA
- reset endpoints structure states on reset
- force full speed for debugging purpose
- add more debugging code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27986 a1c6a512-1295-4272-9138-f99709370657
Without this change the backlight would be enabled but the screen would
show the last content displayed before the screen went off
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27957 a1c6a512-1295-4272-9138-f99709370657
The driver is stable so we can use error codes for debugging
Fix 2 problems in error code path:
- release sd mutex
- release dma module when needed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27915 a1c6a512-1295-4272-9138-f99709370657
fix DMA buffers when the src/dst is in IRAM
It worked fine because all the buffers are in DRAM, and the virtual
address happens to be the physical address
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27876 a1c6a512-1295-4272-9138-f99709370657
(USB stack is not used by default)
This makes debugging the USB driver easier
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27847 a1c6a512-1295-4272-9138-f99709370657
Users will have to reboot to OF manually or to power off, and then plug USB
No message is displayed because usb_detect() is run from a tick
This lacks documentation but should be OK for Unstable devices, and
will hopefully prevent clueless users from opening their devices and
breaking them definitely, instead of waiting for the battery to power
off.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27837 a1c6a512-1295-4272-9138-f99709370657
If the card is not actively deselected on newer Fuzev2, frequent
switches between internal storage and µSD will lock up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27500 a1c6a512-1295-4272-9138-f99709370657
playing from µSD now works to some degree
database update or copy between the 2 drives lock up
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27496 a1c6a512-1295-4272-9138-f99709370657
fuzev2 button_read_device() runs in interrupt context so writes are atomic
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27494 a1c6a512-1295-4272-9138-f99709370657
- Revert BUTTON_HOME
- Modifications to SD driver (µSD not working yet)
TODO: µSD and FM radio
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27492 a1c6a512-1295-4272-9138-f99709370657
The new controller framebuffer (different from what is in clipv1/clipv2 and some clip+) has 128 columns, the old has 132 columns and is centered on the screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27257 a1c6a512-1295-4272-9138-f99709370657
There was a stupid bug in endpoint listing which caused random cancelling of EP0 transfers. The new scheme to handle EP0 transfers should avoid an unexpected setup packet which might cause a deadlock or confuse the core.
There is still an issue with the cancel_transfers function is still.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27178 a1c6a512-1295-4272-9138-f99709370657
There is still a problem after the set address request which makes the driver working randomly.
I still didn't manage do get a proper disconnect interrupt.
From time to time, when unplugging cable, neither rockbox nor usb driver reports disconnect even.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27161 a1c6a512-1295-4272-9138-f99709370657
On tx underruns, a write is aborted early, leaving the dma channel active.
We didn't explicitly disable it, so there were still 4 words in the dma
controller fifo, corrupting the retried write.
To chase this bug I added verify after write, if no one sees write errors in
the next week or so this can be removed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27113 a1c6a512-1295-4272-9138-f99709370657
We always need to write MCI_ARGUMENT register so if the command expects
no argument just set the function argument to 0
Code is now similar to as3525v2
hint: merging the 2 and/or all the SD drivers would be nice
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27088 a1c6a512-1295-4272-9138-f99709370657
Maybe it's not possible to change NAK while the DMA engine is active.
Burst probably can't hurt.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27052 a1c6a512-1295-4272-9138-f99709370657
test_disk says everything is alright but playback is buggy, especially
when playing lossless files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27044 a1c6a512-1295-4272-9138-f99709370657
This caused mounting of µSD to fail on Fuzev2 in some cases, although
the card is detected properly
This might be the cause of playback glitches (more frequent for lossless
files) on clipv2
Trying to set the main PLL at 384MHz and FCLK at 240MHz didn't work, so
there might be some problems not understood yet
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26979 a1c6a512-1295-4272-9138-f99709370657
AMSv2 and AMSv1 lowmem put the codec buffer in IRAM so we need to adjust
the address : AS3525_PHYSICAL_ADDRESS macro will do just that
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26954 a1c6a512-1295-4272-9138-f99709370657
test_disk shows 1MB transfers are up to 3 times faster
not much difference for 1 or 8 sectors at a time
define STORAGE_WANTS_ALIGN to use the fast path when possible
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26953 a1c6a512-1295-4272-9138-f99709370657
- cpufreq is now the same than AMSv1
- audio playback frequency should be more accurate
- adjust pclk (24.8MHz on clipv2/clip+, 41.333..MHz on fuzev2) : it is
still lower than the AMSv1 which use 62MHz on every model
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26937 a1c6a512-1295-4272-9138-f99709370657
We need it for correct charger detection if we boot with charger plugged
because there is no edge interrupt
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26936 a1c6a512-1295-4272-9138-f99709370657
it achieves all the requirements, work fine on c200v2, and is much simpler
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26933 a1c6a512-1295-4272-9138-f99709370657
Reserve 1MB of DRAM for loading rockbox and use the rest as BSS
Write sdram setup in assembler and move it to a separate file, together
with MMU init code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26926 a1c6a512-1295-4272-9138-f99709370657
not working yet : an empty drive is detected
won't link on fuzev1: drivers allocated in usb_storage.c are too large
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26905 a1c6a512-1295-4272-9138-f99709370657
has made it more reliable. It seems to basically work now, but
somehow when Linux tries to read the partition table and it gets the
"scsi read10" command, the storage_read_sectors(drive=0, start=0, count=8)
call never returns...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26894 a1c6a512-1295-4272-9138-f99709370657
Gets a bit more battery life
Adjust current usage, it was a bit too low for Clipv2/Clip+
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26866 a1c6a512-1295-4272-9138-f99709370657
Fix the asm constraints to mark the left output variable as earlyclobber
Thanks to amiconn
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26777 a1c6a512-1295-4272-9138-f99709370657
When building with eabi gcc, 2 variables are assigned the same register
This might be a bug in the constraints, but it's just simpler to use C,
even at the cost of 1 cycle per loop
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26761 a1c6a512-1295-4272-9138-f99709370657
We can't pop into pc on ARMv4t when using thumb: the T bit won't be
modified if we are returning to a thumb function
Code running on ARMv4t should use the new ldrpc / ldmpc macros instead
of ldr pc, [sp], #4 and ldm(cond) sp!, {regs, pc}
No modification on pure ARM builds and ARMv5+
Note: USE_THUMB is currently never defined, no targets can currently be
built with -mthumb, see FS#6734
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26756 a1c6a512-1295-4272-9138-f99709370657
preventing the DMA callback to advance in the recording buffer is not
enough in pcm_rec_dma_get_peak_buffer()
we need to prevent it interrupting us while we are copying the left
channel data into the right channel
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26663 a1c6a512-1295-4272-9138-f99709370657
Fix panics when deleting large files from µSD
Tested on problematic Transcend 4GB Class 6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26631 a1c6a512-1295-4272-9138-f99709370657
(forward port of r26481 + cosmetics)
This lead to freezes under various conditons (bug report: FS#11267)
Battery life is almost not (if at all) affected:
- between 4 and 8 minutes less runtime for fuzev1
- 9 minutes less runtime for c200v2 (2 minutes difference on a 2 hours run)
Additional verifications of the runtime (including on other models) wouldn't hurt
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26512 a1c6a512-1295-4272-9138-f99709370657
reorder static functions to avoid the need for early prototypes
panic if the INT_AUDIO callback could not read the 3 IRQ_ENRD registers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26445 a1c6a512-1295-4272-9138-f99709370657
this removes workaround for spurious interrupts added in r26316
side effect: make keyclicks work correctly when used intensively (with
the scrollwheel for example), the clicks should be inserted fast enough
for the PCM fifo to not become empty.
PL190 can cause spurious interrupts if an interrupt is triggered by a
peripheral shortly before the interrupt for this peripheral is cleared
from VIC registers.
As an effect we should only write in VIC_INT_EN_CLEAR after having
disabled the source of the interrupt in the peripheral.
references on PL190 spurious interrupts:
- http://www.embeddedrelated.com/groups/lpc2000/show/14599.php
- http://water.cse.unsw.edu.au/esdk/lpc2/spurious-irq.html
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26444 a1c6a512-1295-4272-9138-f99709370657
invert setting isn't remembered when backlight goes off and lcd_enable()
is ran again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26374 a1c6a512-1295-4272-9138-f99709370657