summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/ssp-imx233.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-28imx233: generate register headers using headergen_v2 and update code for itAmaury Pouly1-15/+50
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
2013-09-26imx233: always start SSPCLK before ungating the spp blocksAmaury Pouly1-9/+15
This should fix some boot hang issues which appeared at random. Change-Id: I5430690a61c042b45ed26b58f485a1cc5d82987f
2013-08-21imx233: fix drive strength for sd/mmcAmaury Pouly1-29/+32
At high speed, we need a drive strength of 8mA on the clock line to get stable transfers. Change-Id: Ida668db10cd3e10ad5740e35fd973f2fa394edb2
2013-06-17imx233: fix ssp for stmp3600 and stmp3700Amaury Pouly1-0/+45
Using the ssp macros, we can easily handle the stmp3600 which has a single ssp block. Take care of all the nasty differences between targets like bus width Change-Id: If98a091cc262e9e6834f6fb9826f7c5515bfe621
2013-06-17imx233: improve sspAmaury Pouly1-11/+10
Under some circumstance (timeout), the dma interrupt is not fired and only the error one is. This can happen with some picky SD cards and with the current code it causes a 1 second timeout. This code properly catches the error interrupt to stop as soon as possible. Change-Id: I9c53ea272d01793f0f229571502e99eb62f1b723
2013-06-17imx233: normalise clkctrlAmaury Pouly1-11/+8
The clkctrl functions were becoming a mess. Normalise the names, get rid of the xtal derived as special case and use the same interface. Change-Id: Ib954a8d30a6bd691914b5e0d97774ec9fc560c50
2013-06-17imx233: introduce virtual pins to simplify pin setupAmaury Pouly1-41/+40
A number of pins on the imx233 are standard and manually calling functions to acquire, set function/drive/output is painful. This will become unmanageable when we will add support for the other stmp chips. Introduce the concept of virtual pin which is a way to completely describe a virtual pin (virtual because pins are muxed). Change-Id: I01b6e040945648e58e1d1abab06529c9571c5f10
2013-06-17imx233: enhance pinctrl irq with user pointerAmaury Pouly1-21/+10
Change-Id: I191704299487598a853af4df5aebbbf8a7134a34
2013-06-17imx233: normalise pinctrl namesAmaury Pouly1-36/+36
The current pinctrl functions were a mess. Normalise the functions names to make them shorter and clearer. Change-Id: Iac6ff84625ef2b7610268e3a5802dc0088de3167
2013-06-16imx233: rewrite dma using new register headersAmaury Pouly1-7/+4
Change-Id: If73b84d9c9f4a152a54fb9d2dbec895e72d2e753
2013-06-16imx233: rewrite ssp using new register headersAmaury Pouly1-56/+58
Change-Id: Ibf186b610beb07bd615c976630cdca9de2c7448e
2012-12-29Fix copyright headersAmaury Pouly1-4/+1
Change-Id: Ie65920b1192e9b737fcc2554d280fbcedfa39800
2012-05-20imx233: make sure dma descriptors are cache friendlyAmaury Pouly1-1/+5
Because DMA descriptors needs to be committed and discarded from the cache, if they are not cache aligned and/or if their size is not a multiple of cache ligne, nasty side effects could occur with adjacents data. The same applies to DMA buffers which are still potentially broken. Add a macro to ensure that these constraints will not break by error in the future. Change-Id: I1dd69a5a9c29796c156d953eaa57c0d281e79846
2012-05-19imx233: completely rework the sd driverAmaury Pouly1-3/+37
Change-Id: I456df0d9f5eaee435bdfd5a3f667055715e53d2a
2012-05-19imx233: move icoll stuff to its own fileAmaury Pouly1-1/+1
The icoll code now has an IRQ storm detection mechanism which will prevent the device from hard freezing in case it happen. Change-Id: I9861238dce61d29af1e48f9c534ec63a7f23465c
2012-05-19imx233: fix clkctrl namingAmaury Pouly1-7/+7
Move to a more consistent naming convention like the other devices Change-Id: I4ddbbee27ee9f5ae775c5776592ec7ce02b30948
2012-05-10imx233: add pinctrl debug code to track pin usesAmaury Pouly1-3/+11
Past development has proved that one can mistakely use the same pin for two uses without noticing. Since this causes extremely hard to find bugs, the infrastructure will allow to register pin uses and panic when a conflict is detected. The pinctrl debug now shows the pin uses when its support is compiled in. Change-Id: Idb2d5235ce09207d77aa474d6f158e72b933761a
2011-12-15imx233/fuze+: add support for sd card, enable FAT16 support because it's ↵Amaury Pouly1-25/+16
common on sd cards git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31268 a1c6a512-1295-4272-9138-f99709370657
2011-09-13imx233/fuze+: reset ssp block correctly, define maximum ssp transfer sizeAmaury Pouly1-2/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30525 a1c6a512-1295-4272-9138-f99709370657
2011-07-23imx233/fuze+: huge reworkAmaury Pouly1-1/+0
- 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
2011-07-22imx233/fuze+: add SD detection supportbootloader_ams_v4Amaury Pouly1-16/+86
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30196 a1c6a512-1295-4272-9138-f99709370657
2011-07-03imx233/fuze+: replace software i2c by hardware i2c, make some code more ↵Amaury Pouly1-0/+4
correct, reduce code size of lcd init sequences git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30120 a1c6a512-1295-4272-9138-f99709370657
2011-07-02imx233/fuze+: simplify ssp pin codeAmaury Pouly1-29/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30113 a1c6a512-1295-4272-9138-f99709370657
2011-06-30imx233/fuze+: ssp, dma, mmc now work properly, partially implement cpu ↵Amaury Pouly1-22/+39
frequency changing, implement panic waiting git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30104 a1c6a512-1295-4272-9138-f99709370657
2011-06-17fuze+: add more clocking code, add dma code, add ssp code, add stub usb ↵Amaury Pouly1-0/+307
code, update storage to SD + MMC, beginning of the driver git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30010 a1c6a512-1295-4272-9138-f99709370657