summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/system-jz4740.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-13jz47xx: Add support for INIT regionSolomon Peachy1-1/+1
Change-Id: I100cd661e9b1225167463542800c6aafbc3c17b3
2022-10-17mips: consolidate exception handling, add exception backtracesAidan MacDonald1-74/+0
Merge the x1000 and jz47xx exception handling code since they use the same exception vectors and handlers. The interrupt handler is now called from the common exception vector, but remains separate for each board since they have different IRQ layouts. The new exception handler can provide a stack traceback from the interrupted code, rather than the (uninteresting) caller traceback displayed by panicf. This allows you to see what led up to a null pointer deref or division by zero, which makes it _much_ easier to track down errors that occur in common leaf functions like strcmp. Change-Id: I59a0ebb5e40fcb36505c3bfdb47f8cac2f9936b1
2020-09-05mips: Convert 'nop' to 'ssnop' -- for future-proofingSolomon Peachy1-12/+12
Change-Id: I17625f4d56a1f5205887cb47668a2dcb628053f4
2020-09-03mips: Heavily rework DMA & caching codeSolomon Peachy1-8/+7
Based on code originally written by Amaury Pouly (g#1789, g#1791, g#1527) but rebased and heavily updated. Change-Id: Ic794abb5e8d89feb4b88fc3abe854270fb28db70
2020-07-24[4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.Solomon Peachy1-2/+1
Note: I left behind lcd_bitmap in features.txt, because removing it would require considerable work in the manual and the translations. Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2015-01-12Get rid of stupid _backlight_* function namesMarcin Bukat1-1/+1
_remote_backlight_* and _buttonlight_* are cleaned as well Change-Id: I73653752831bbe170c26ba95d3bc04c2e3a5cf30
2013-03-11jz4740: a few minor fixesMarcin Bukat1-1/+1
This was spotted while playing with qemu-jz: 1) rockbox reads TECR and TESR which are described as write-only registers. Datasheet doesn't mention what happens if they are readed. Apparently this doesn't have fatal side effects. It comes down to two defines from jz4740.h __tcu_stop_counter(n) and __tcu_start_counter(n) which use read-modify-write sequence. 2) rockbox accesses out of bound offset 0xd4 in DMA memspace. It comes from dis_irq() in system-jz4740.c. NUM_DMA is 6 but DMA channels are 0-5 so (irq <= IRQ_DMA_0 + NUM_DMA)) bound check is wrong. This are *NOT* tested on device. Change-Id: I29dff6a4f828030877b7d50fbcc98866478b9e3d Reviewed-on: http://gerrit.rockbox.org/338 Reviewed-by: Bertrik Sikken <bertrik@sikken.nl> Tested-by: Purling Nayuki <cyq.yzfl@gmail.com> Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2011-12-21Add missing includes found using -Wmissing-declarations.Boris Gjenero1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31396 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz1-1/+0
directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Ingenic Jz4740: Use lcd_putsf() instead of lcd_puts() in exception handlerMaurus Cuelenaere1-5/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25849 a1c6a512-1295-4272-9138-f99709370657
2009-12-05Ingenic Jz4740: fix CPU boosting (was reversed)Maurus Cuelenaere1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23864 a1c6a512-1295-4272-9138-f99709370657
2009-11-14Set DRMODE_SOLID, uniform colors, and sysfont before clearing LCD to display ↵Andrew Mahone1-1/+9
panic or exception messages - see FS#10665. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23623 a1c6a512-1295-4272-9138-f99709370657
2009-07-26Ingenic Jz4740 targets: turn backlight on when an exception occurs and ↵Maurus Cuelenaere1-0/+2
EXTENDED_EXCEPTION_DESC is defined git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22052 a1c6a512-1295-4272-9138-f99709370657
2009-07-03Ingenic Jz4740: add basic frequency switchingMaurus Cuelenaere1-3/+20
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21625 a1c6a512-1295-4272-9138-f99709370657
2009-06-04Ingenic Jz4740: fix debug messages not being readable due to backdropMaurus Cuelenaere1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21186 a1c6a512-1295-4272-9138-f99709370657
2009-06-03Ingenic Jz4740: add extended exception debug reporting optionMaurus Cuelenaere1-1/+36
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21183 a1c6a512-1295-4272-9138-f99709370657
2009-03-25Jz4740: Optimize interrupt handling by using a find_last_set_bit() ↵Maurus Cuelenaere1-10/+15
implementation git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20539 a1c6a512-1295-4272-9138-f99709370657
2009-02-26Ingenic Jz4740:Maurus Cuelenaere1-1/+1
* Add initial RoLo support * Don't enable IRAM in plugins for now * Initial try at getting PCM working (doesn't crash anymore at least) * Replace hard-coded constant with #define in usb-jz4740 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20115 a1c6a512-1295-4272-9138-f99709370657
2009-02-23Ingenic Jz4740:Maurus Cuelenaere1-2/+2
* Fix USB issues + add DMA support (doesn't work fully) * Make exception handler a bit more descriptive git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20091 a1c6a512-1295-4272-9138-f99709370657
2009-02-16Onda VX747:Maurus Cuelenaere1-0/+3
* Rework battery reading * Get power off back working * Add time to debug view * Convert TABs to spaces in firmware/export/mips*.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20024 a1c6a512-1295-4272-9138-f99709370657
2009-02-13Onda VX747:Maurus Cuelenaere1-312/+45
* Add preliminary keymap * Split up generic MIPS stuff from Ingenic specific * Make apps/ compilable * Add SD driver * Fix RTC driver * Add debug screen * Other cleanups/rewrites/fixes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19993 a1c6a512-1295-4272-9138-f99709370657
2009-02-09Onda VX747: commit some parts to get apps/ to compile (more will follow)Maurus Cuelenaere1-184/+169
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19954 a1c6a512-1295-4272-9138-f99709370657
2009-02-04MIPS:Maurus Cuelenaere1-10/+11
* Add missing mmu-mips.h change Onda VX747: * Correct USB power handling * Improve NAND handling * Other minor fixes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19921 a1c6a512-1295-4272-9138-f99709370657
2009-01-21Onda VX747:Maurus Cuelenaere1-100/+1
* Get USB working (it isn't good at writing support though) * Clean up NAND & SD a bit * Other comments/fixes Ingenic Jz4740/MIPS: * Split MMU from system git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19815 a1c6a512-1295-4272-9138-f99709370657
2009-01-08Clean up panicf and introduce system_exception_wait to do further target ↵Michael Sevakis1-0/+10
tasks and wait for a button when an unrecoverable error has occurred (panic, UIE, etc.). Returning from that function should reboot or don't return from it. Move UIE and __div0 for ARM to its own file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19716 a1c6a512-1295-4272-9138-f99709370657
2008-12-31Ingenic players:Maurus Cuelenaere1-0/+171
* Further implement USB driver * Add preliminary clock setup * Fix USB VID/PID git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19618 a1c6a512-1295-4272-9138-f99709370657
2008-12-20Ingenic players:Maurus Cuelenaere1-0/+3
* Enable clocks when needed * Fix VX747+ button_hold() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19505 a1c6a512-1295-4272-9138-f99709370657
2008-12-20Ingenic targets:Maurus Cuelenaere1-50/+54
* LCD rework * Dynamic DMA enabling * PCM cleanup * USB: replace printf() with logf() * System: get rid of in_interrupt_mode() * Backlight: add support for software PWM git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19495 a1c6a512-1295-4272-9138-f99709370657
2008-12-04Oops, logic error! Interrupts enabled != in interrupt modeMaurus Cuelenaere1-4/+15
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19336 a1c6a512-1295-4272-9138-f99709370657
2008-12-04Implement in_interrupt_mode() properlyMaurus Cuelenaere1-15/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19334 a1c6a512-1295-4272-9138-f99709370657
2008-12-04Ingenic targets:Maurus Cuelenaere1-1/+1
* Clean up codec & PCM + functional changes * LCD: Don't wait on DMAC in lcd_unlock() * SADC: add battery mutex + other changes * NAND: add mutex * USB rework (still not working) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19327 a1c6a512-1295-4272-9138-f99709370657
2008-12-03Jz4740 targets: make sure you don't yield when in interrupt modeMaurus Cuelenaere1-0/+11
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19309 a1c6a512-1295-4272-9138-f99709370657
2008-11-04Onda VX747:Maurus Cuelenaere1-3/+20
clean up's, bug fixes and reworks git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19007 a1c6a512-1295-4272-9138-f99709370657
2008-09-14Onda VX747:Maurus Cuelenaere1-53/+19
* Get rid of bug when interrupts are enabled * Get threading to work (although with some weirdness) * Other fixes/optimizations git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18512 a1c6a512-1295-4272-9138-f99709370657
2008-09-05Add Onda VX767 targetMaurus Cuelenaere1-50/+72
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18422 a1c6a512-1295-4272-9138-f99709370657
2008-08-26Onda VX747:Maurus Cuelenaere1-39/+136
* Overall cleanup (still needs work) * Add preliminary USB support * Add power off support * Add preliminary MMU handling git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18348 a1c6a512-1295-4272-9138-f99709370657
2008-08-15Jz4740: get exception handling workingMaurus Cuelenaere1-4/+30
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18287 a1c6a512-1295-4272-9138-f99709370657
2008-08-10* Get interrupts working (but crashes after 10-30secs)Maurus Cuelenaere1-19/+12
* Make current_tick increase * Convert button driver into SADC driver * Make touchscreen handling work better (still needs good calibration routine) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18240 a1c6a512-1295-4272-9138-f99709370657
2008-08-09* Add interrupt handling (but still not working)Maurus Cuelenaere1-57/+340
* Clean up linker script and bootup routines git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18229 a1c6a512-1295-4272-9138-f99709370657
2008-08-06* Add basic (non-working) support for NAND flashMaurus Cuelenaere1-2/+30
* Add panicf() handling * Add not-yet-enabled dma acceleration * Other (minor) fixes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18203 a1c6a512-1295-4272-9138-f99709370657
2008-07-171) Set svn:keywords where they should've been setMaurus Cuelenaere1-15/+227
2) Onda VX747 specific changes git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18080 a1c6a512-1295-4272-9138-f99709370657
2008-07-16Fix the LCD bug!Maurus Cuelenaere1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18071 a1c6a512-1295-4272-9138-f99709370657
2008-07-15Onda VX747:Maurus Cuelenaere1-5/+3
1) Improve touchscreen handling 2) Add RTC driver 4) Add NAND Flash ID scanning 3) Other minor fixes Nand_ID: Add a generic NAND ID database (currently only containg Samsung chips) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18052 a1c6a512-1295-4272-9138-f99709370657
2008-07-14Remove svn:executableMaurus Cuelenaere1-0/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18033 a1c6a512-1295-4272-9138-f99709370657
2008-07-14Add preliminary support for the Onda VX747 (MIPS target)Maurus Cuelenaere1-0/+71
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18032 a1c6a512-1295-4272-9138-f99709370657