summaryrefslogtreecommitdiff
path: root/firmware/drivers/rtc (follow)
Commit message (Collapse)AuthorAge
* Move intrinsic RTC implmentation differences to driver filesMichael Sevakis2017-01-26
| | | | | | | | | | | Some drivers set tm_wday just fine and do not need it coerced to be correct. Others set tm_yday, so don't overwrite what the driver sets; just zero it inside if it can't fill the field. Move calls to set_day_of_week() to the sorts of drivers that presumably required the hammer (FS#11814) in get_time() where the weekday isn't locked to the date. Change-Id: Idd0ded6bfc9d9f48fcc1a6074068164c42fcf24a
* imx233: generate register headers using headergen_v2 and update code for itAmaury Pouly2016-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | NOTE: this commit does not introduce any change, ideally even the binary should be almost the same. I checked the disassembly by hand and there are only a few differences here and there, mostly the compiler decides to compile very close expressions slightly differently. I tried to run the new code on several targets to make sure and saw no difference. The major syntax changes of the new headers are as follows: - BF_{WR,SET,CLR} are now superpowerful and allows to set several fileds at once: BF_WR(reg, field1(value1), field2(value2), ...) - BF_CS (use like BF_WR) does a write to reg_CLR and then reg_SET instead of RMW - there is no more need for macros like BF_{WR_,SET,CLR}_V, since one can simply BF_WR with field_V(name) - the old BF_SETV macro has no trivial equivalent and is replaced with its its equivalent for BF_WR(reg_SET, ...) I also rename the register headers: "regs/regs-x.h" -> "regs/x.h" to avoid the redundant "regs". Final note: the registers were generated using the following command: ./headergen_v2 -g imx -o ../../firmware/target/arm/imx233/regs/ desc/regs-stmp3{600,700,780}.xml Change-Id: I7485e8b4315a0929a8edb63e7fa1edcaa54b1edc
* Don't return pointer to array allocated on the stackThomas Jarosch2015-01-13
| | | | | | | | | | It will be out of scope once the function is left. cppcheck reported: [firmware/drivers/rtc/rtc_zenvisionm.c:31]: (error) Pointer to local array variable returned. [firmware/drivers/rtc/rtc_zenvisionm.c:38]: (error) Pointer to local array variable returned. Change-Id: Ibf28ba9b3d20cadcaff22398e143488c86746660
* sonynwz: fix time handlingAmaury Pouly2013-09-26
| | | | | | Be consistent with the OF and use RTC PERSISTENT2 as offset Change-Id: Ic8b970cbc4096d1f4efa0380a3af51c93484fe58
* imx233: implement alarm wake upAmaury Pouly2013-07-02
| | | | | | | | | | This adds the application part of alarm wake up. On some targets like the Fuze+, it will also require a bootloader change to make sure that the device doesn't power down on alarm wake up (for example on the Fuze+ the bootloader requires the power button to be hold sufficiently long, thus preventing alarm wake up to work) Change-Id: I5d01957852355fddbd48110d3d75a5533f07879e
* zenxfi3: RTC is used in same was as in fuze+, using seconds-since-1970 plus ↵Bertrik Sikken2012-05-27
| | | | | | an offset Change-Id: Iab2e6e15c790c26d3bf2679e9f965a409d162783
* imx233: move rtc init from drivers/ to firmware/Amaury Pouly2012-05-19
| | | | Change-Id: Id816987a4bb1191d5c9cf8a85c51d75fbb2da7c8
* as3514 rtc: sansa clip zip uses 1970/1/1 base date instead of special ↵Bertrik Sikken2012-04-17
| | | | | | AS3525v2 date Change-Id: I32329c82da93c705a5cb4af8a1a8b4e85a9c9b37
* Convert IMX233 RTC driver (used in fuze+) to use mktime and gmtimeBertrik Sikken2012-03-13
| | | | Change-Id: Ie71d495509a81db5e02078398f5d722c00136072
* Introduce gmtime.c and use it in the AS3514 RTC driverBertrik Sikken2012-03-11
| | | | | | | | Change-Id: I00a09ae28a68f8153fb8fa854fea741ddfb0bf09 Reviewed-on: http://gerrit.rockbox.org/175 Tested-by: Bertrik Sikken <bertrik@sikken.nl> Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Reviewed-by: Rafaël Carré <rafael.carre@gmail.com>
* cowond2's power-target.h -> rename in pmu-target.hRafaël Carré2012-01-07
| | | | | | other targets (ipod nano2g / classic) use that name for pmu git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31618 a1c6a512-1295-4272-9138-f99709370657
* imx233/fuze+: implement rtc (time only, alarm still to implement)Amaury Pouly2011-12-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31473 a1c6a512-1295-4272-9138-f99709370657
* Initial commit of the Samsung YP-R0 port.Thomas Martitz2011-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This port is a hybrid native/RaaA port. It runs on a embedded linux system, but is the only application. It therefore can implement lots of stuff that native targets also implement, while leveraging the underlying linux kernel. The port is quite advanced. User interface, audio playback, plugins work mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page). Included in utils/ypr0tools are scripts and programs required to generate a patched firmware. The patched firmware has the rootfs modified to load Rockbox. It includes a early/safe USB mode. This port needs a new toolchain, one that includes glibc headers and libraries. rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may also work. Most of the initial effort is done by Lorenzo Miori and others (on ABI), including reverse engineering and patching of the original firmware, initial drivers, and more. Big thanks to you. Flyspray: FS#12348 Author: Lorenzo Miori, myself Merry christmas to ypr0 owners! :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
* imx233/fuze+: huge reworkAmaury Pouly2011-07-23
| | | | | | | | | | | | | | | - enable MMU -rework lcd frame buffer - add rtc/adc/power stubs (or not) - fix a few MMC related defines (hopefully) - implement cache handling for DMA - more SD work - add keymap (based on clip) - add virtual buttons - update linker scripts - big step toward apps actually compiling git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30200 a1c6a512-1295-4272-9138-f99709370657
* mc13783 RTC: Handle years in a better way for the use of struct tm. Make the ↵Michael Sevakis2010-12-24
| | | | | | code less general because all years evenly divisible by 4 in the day range are leap years. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28891 a1c6a512-1295-4272-9138-f99709370657
* RTC s35380a - remove unneeded header files includesMarcin Bukat2010-12-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28778 a1c6a512-1295-4272-9138-f99709370657
* RTC s35380a - cleanup and more commentsMarcin Bukat2010-12-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28772 a1c6a512-1295-4272-9138-f99709370657
* RTC s35380a - proper alarm supportMarcin Bukat2010-12-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28763 a1c6a512-1295-4272-9138-f99709370657
* RTC s35380a - add support for alarm function. Currently this powers up the ↵Marcin Bukat2010-12-06
| | | | | | device but doesn't start selected function (radio/recording/playback) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28740 a1c6a512-1295-4272-9138-f99709370657
* RTC s35380a - fix initialization.Marcin Bukat2010-11-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28711 a1c6a512-1295-4272-9138-f99709370657
* HD300 - add basic RTC supportMarcin Bukat2010-11-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28697 a1c6a512-1295-4272-9138-f99709370657
* Another (hopefully final) fix for FS#11453 (AMSv2 powerdown fails sometimes ↵Bertrik Sikken2010-11-01
| | | | | | | | | when wakeup timer set) by Fabian Vogel. This fix disables MCLK before powerdown-for-wakeup. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28435 a1c6a512-1295-4272-9138-f99709370657
* tcc77x targets: various minor cleanupsBertrik Sikken2010-08-28
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27913 a1c6a512-1295-4272-9138-f99709370657
* Various minor fixes for Samsung YH* targetsBertrik Sikken2010-08-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27751 a1c6a512-1295-4272-9138-f99709370657
* rtc_as3514.c: make alarm struct static and reorder fields to save some binsizeBertrik Sikken2010-07-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27448 a1c6a512-1295-4272-9138-f99709370657
* Fix failing AMSv2 power-down when the wake-up alarm timer is set - FS #11453 ↵Bertrik Sikken2010-07-16
| | | | | | by me git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27447 a1c6a512-1295-4272-9138-f99709370657
* Sansa clip+: prevent an unnecessary OF database refresh when using the ↵Bertrik Sikken2010-06-27
| | | | | | wake-up alarm with a uSD card inserted (probably works for other AMSv2 targets too) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27158 a1c6a512-1295-4272-9138-f99709370657
* AMSv2 RTC: no need to write to RTC_WAKEUP registerRafaël Carré2010-06-17
| | | | | | | | | The wakeup alarm will be disabled when powering off anyway OF database refresh of µSD now only happens if the wakeup was explicitely enabled There still seems to be a freeze problem when powering off (sometimes) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26875 a1c6a512-1295-4272-9138-f99709370657
* fix typo in r26245 (I guess not many people use rtc_alarm with gigabeat f)Robert Kukla2010-06-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26635 a1c6a512-1295-4272-9138-f99709370657
* as3543 rtc wakeup: fix power offRafaël Carré2010-05-24
| | | | | | | | If we disable the hearbeat source after enabling the watchdog there's no more lock-up when powering off the dap Comment out alarm enabling on startup since rockbox disables the alarm anyway git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26247 a1c6a512-1295-4272-9138-f99709370657
* rtc_enable_alarm() needs no return valueRafaël Carré2010-05-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26245 a1c6a512-1295-4272-9138-f99709370657
* as3525v2: RTC alarmRafaël Carré2010-05-22
| | | | | | | A specific poweroff function needs to be used for wake-up to work Disable RTC in bootloaders for consistency with other Sansas git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26243 a1c6a512-1295-4272-9138-f99709370657
* i.MX31/Gigabeat S: Actually enable DPTC which can set optimal voltage for ↵Michael Sevakis2010-05-04
| | | | | | 528MHz. Requires an SPI and PMIC interface rework because of the low-latency needs for the DPTC to work best with minimal panicing. SPI can work with multitasking and asynchronously from interrupt handlers or normal code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25800 a1c6a512-1295-4272-9138-f99709370657
* Clip+: show the same real time in OF and rockboxRafaël Carré2010-02-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24859 a1c6a512-1295-4272-9138-f99709370657
* fix warnings in s35390 rtc driverBertrik Sikken2010-01-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24380 a1c6a512-1295-4272-9138-f99709370657
* Ingenic Jz4740: simplify RTC driver (you will need to re-set the clock)Maurus Cuelenaere2010-01-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24201 a1c6a512-1295-4272-9138-f99709370657
* Final removal of tabs in firmware pathAndree Buschmann2010-01-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24158 a1c6a512-1295-4272-9138-f99709370657
* Fix same bug as in r23531 in two more drivers (wrong masking of wday)Nils Wallménius2009-11-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23536 a1c6a512-1295-4272-9138-f99709370657
* RTC read of ds1339 of ds3231 weekday Robert Kukla2009-11-05
| | | | | | | Flyspray: FS #10760 Author: Simon Rothen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23531 a1c6a512-1295-4272-9138-f99709370657
* Replace a couple of magic numbers with the appropriate constants.Rob Purchase2009-10-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23138 a1c6a512-1295-4272-9138-f99709370657
* D2: The RTC chip needs to be runtime detected.Rob Purchase2009-10-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23112 a1c6a512-1295-4272-9138-f99709370657
* as3514 RTC driver: correct calculation, fixes FS#10625Michael Chicoine2009-10-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23037 a1c6a512-1295-4272-9138-f99709370657
* Add missing parentheses to fix redNils Wallménius2009-09-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22840 a1c6a512-1295-4272-9138-f99709370657
* FS#10569 RTC driver cleanupNils Wallménius2009-09-26
| | | | | | | | Change the RTC drivers so that the rtc_(read|write)_datetime functions now deal directly with the tm struct instead of passing a string of bcd digits to/from (set|get)_time . This simplifies drivers for rtc's that do not use a bcd representation internally and cleans up some target specific code and #ifdefs in generic code. Implement simple stubs for the sim to avoid #ifdefing for that too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22839 a1c6a512-1295-4272-9138-f99709370657
* Correct svn:keywords and svn:eol-style on a few more files.Thomas Martitz2009-07-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21798 a1c6a512-1295-4272-9138-f99709370657
* S35390a RTC: fix duplicate i2c initialisationBertrik Sikken2009-07-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21679 a1c6a512-1295-4272-9138-f99709370657
* Add RTC driver for Seiko S35390A (used in the Meizu M3 and possibly other ↵Bertrik Sikken2009-06-28
| | | | | | Meizus) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21539 a1c6a512-1295-4272-9138-f99709370657
* M:Robe 500: RTC is now working, Added some SPI flexibility per end device ↵Karl Kurbjun2009-06-24
| | | | | | and modified the interrupt handler for the tsc2100 which should make it more reliable. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21483 a1c6a512-1295-4272-9138-f99709370657
* Ingenic Jz4740: add a delay between enabling the RTC clock and setting the ↵Maurus Cuelenaere2009-05-06
| | | | | | RTC time git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20862 a1c6a512-1295-4272-9138-f99709370657
* M:Robe 500 - Fix some of the Keymaps, touchscreen improvements to decrease ↵Karl Kurbjun2009-05-02
| | | | | | inacurate reads, add support for dynamic frequency (was running at 87.5 MHz, now it runs at 175 MHz when boosted), disable clock to unneded modules (decreased power by 20 mA), LCD turnoff now works without graphic glitches, battery ADC read now returns scaled voltage, define backlight fading git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20846 a1c6a512-1295-4272-9138-f99709370657