<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rockbox/firmware/export/sd.h, branch wolf3d</title>
<subtitle>My Rockbox tree</subtitle>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/'/>
<entry>
<title>Unify storage threads into one</title>
<updated>2017-10-26T18:35:41+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2017-03-15T05:51:54+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=1654efc31339972d0e6bd41a499fcffc0a45822e'/>
<id>1654efc31339972d0e6bd41a499fcffc0a45822e</id>
<content type='text'>
* Editing a bunch of drivers' thread routines in order to
implement a new feature is tedious.

* No matter the number of storage drivers, they share one thread.
No extra threads needed for CONFIG_STORAGE_MULTI.

* Each has an event callback called by the storage thread.

* A default callback is provided to fake sleeping in order to
trigger idle callbacks. It could also do other default processing.
Changes to it will be part of driver code without editing each
one.

* Drivers may sleep and wake as they please as long as they give
a low pulse on their storage bit to ask to go into sleep mode.
Idle callback is called on its behalf and driver immediately put
into sleep mode.

* Drivers may indicate they are to continue receiving events in
USB mode, otherwise they receve nothing until disconnect (they
do receive SYS_USB_DISCONNECTED no matter what).

* Rework a few things to keep the callback implementation sane
and maintainable. ata.c was dreadful with all those bools; make
it a state machine and easier to follow. Remove last_user_activity;
it has no purpose that isn't served by keeping the disk active
through last_disk_activity instead.

* Even-out stack sizes partly because of a lack of a decent place
to define them by driver or SoC or whatever; it doesn't seem too
critical to do that anyway. Many are simply too large while at
least one isn't really adequate. They may be individually
overridden if necessary (figure out where). The thread uses the
greatest size demanded. Newer file code is much more frugal with
stack space. I barely see use crack 50% after idle callbacks
(usually mid-40s). Card insert/eject doesn't demand much.

* No forcing of idle callbacks. If it isn't necessary for one or
more non-disk storage types, it really isn't any more necessary for
disk storage. Besides, it makes the whole thing easier to implement.

Change-Id: Id30c284d82a8af66e47f2cfe104c52cbd8aa7215
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Editing a bunch of drivers' thread routines in order to
implement a new feature is tedious.

* No matter the number of storage drivers, they share one thread.
No extra threads needed for CONFIG_STORAGE_MULTI.

* Each has an event callback called by the storage thread.

* A default callback is provided to fake sleeping in order to
trigger idle callbacks. It could also do other default processing.
Changes to it will be part of driver code without editing each
one.

* Drivers may sleep and wake as they please as long as they give
a low pulse on their storage bit to ask to go into sleep mode.
Idle callback is called on its behalf and driver immediately put
into sleep mode.

* Drivers may indicate they are to continue receiving events in
USB mode, otherwise they receve nothing until disconnect (they
do receive SYS_USB_DISCONNECTED no matter what).

* Rework a few things to keep the callback implementation sane
and maintainable. ata.c was dreadful with all those bools; make
it a state machine and easier to follow. Remove last_user_activity;
it has no purpose that isn't served by keeping the disk active
through last_disk_activity instead.

* Even-out stack sizes partly because of a lack of a decent place
to define them by driver or SoC or whatever; it doesn't seem too
critical to do that anyway. Many are simply too large while at
least one isn't really adequate. They may be individually
overridden if necessary (figure out where). The thread uses the
greatest size demanded. Newer file code is much more frugal with
stack space. I barely see use crack 50% after idle callbacks
(usually mid-40s). Card insert/eject doesn't demand much.

* No forcing of idle callbacks. If it isn't necessary for one or
more non-disk storage types, it really isn't any more necessary for
disk storage. Besides, it makes the whole thing easier to implement.

Change-Id: Id30c284d82a8af66e47f2cfe104c52cbd8aa7215
</pre>
</div>
</content>
</entry>
<entry>
<title>storage: fix MD vs MV confusion</title>
<updated>2013-12-06T00:55:21+00:00</updated>
<author>
<name>Amaury Pouly</name>
<email>amaury.pouly@gmail.com</email>
</author>
<published>2013-12-06T00:55:21+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=065910663a83577acfb8e464403abdbcd2e6c042'/>
<id>065910663a83577acfb8e464403abdbcd2e6c042</id>
<content type='text'>
Change-Id: If0e4b0ac8b24413b77f1d67293c652c6a0e01bbd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: If0e4b0ac8b24413b77f1d67293c652c6a0e01bbd
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup MV/MD macros a little.</title>
<updated>2013-08-17T16:18:22+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2013-08-17T16:18:22+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=a56f1ca1ed63b93eb61fd5319f47347b3eb1e364'/>
<id>a56f1ca1ed63b93eb61fd5319f47347b3eb1e364</id>
<content type='text'>
When using variadic macros there's no need for IF_MD2/IF_MV2 to deal
with function parameters. IF_MD/IF_MV are enough.

Throw in IF_MD_DRV/ID_MV_VOL that return the parameter if MD/MV, or 0
if not.

Change-Id: I7605e6039f3be19cb47110c84dcb3c5516f2c3eb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using variadic macros there's no need for IF_MD2/IF_MV2 to deal
with function parameters. IF_MD/IF_MV are enough.

Throw in IF_MD_DRV/ID_MV_VOL that return the parameter if MD/MV, or 0
if not.

Change-Id: I7605e6039f3be19cb47110c84dcb3c5516f2c3eb
</pre>
</div>
</content>
</entry>
<entry>
<title>Add more INIT_ATTR and add config.h includes to header files with INIT_ATTR.</title>
<updated>2011-12-19T20:12:52+00:00</updated>
<author>
<name>Boris Gjenero</name>
<email>dreamlayers@rockbox.org</email>
</author>
<published>2011-12-19T20:12:52+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=fdc29d0ea4fbdd2cc1509a53122be7ec85cdb432'/>
<id>fdc29d0ea4fbdd2cc1509a53122be7ec85cdb432</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31370 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31370 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>Add INIT_ATTR to storage_init() when possible</title>
<updated>2011-11-20T18:44:40+00:00</updated>
<author>
<name>Rafaël Carré</name>
<email>rafael.carre@gmail.com</email>
</author>
<published>2011-11-20T18:44:40+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=814ffffdbe5a5ea420ddc6475512a75cba7a8583'/>
<id>814ffffdbe5a5ea420ddc6475512a75cba7a8583</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31036 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31036 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>Bootloader USB mode for PP502x. Enable only on GoGear SA9200 for the time being. Add HAVE_BOOTLOADER_USB_MODE to config if BOOTLOADER is defined to enable it. Clean up some kernel stuff a little to support it. Mess up a bunch of other stuff (hopefully not too badly).</title>
<updated>2011-01-15T08:19:30+00:00</updated>
<author>
<name>Michael Sevakis</name>
<email>jethead71@rockbox.org</email>
</author>
<published>2011-01-15T08:19:30+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=3a1127785b9f29e526b2ab845efe0a313699c459'/>
<id>3a1127785b9f29e526b2ab845efe0a313699c459</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29053 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29053 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove card_enable_monitoring() and use a mutex instead. The card_enable_monitoring() method actually didn't eliminate the possible race conditions it was meant to fix.</title>
<updated>2010-06-06T13:20:47+00:00</updated>
<author>
<name>Frank Gevaerts</name>
<email>frank@gevaerts.be</email>
</author>
<published>2010-06-06T13:20:47+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=9c43b2ce17cbc1f88b825ab8a5021575cee46dd7'/>
<id>9c43b2ce17cbc1f88b825ab8a5021575cee46dd7</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused card_detect(), and make card_detect_target() static inline in each sd driver.</title>
<updated>2009-11-26T00:51:09+00:00</updated>
<author>
<name>Thomas Martitz</name>
<email>kugel@rockbox.org</email>
</author>
<published>2009-11-26T00:51:09+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=ee7cf6c63c67222dcf9af6f40098428c577ee775'/>
<id>ee7cf6c63c67222dcf9af6f40098428c577ee775</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23757 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23757 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>sd.h:  No functional changes to present code.  Added some additional SD CMD's and a  #define for card errors flagged in an R1 response.</title>
<updated>2009-11-07T22:11:25+00:00</updated>
<author>
<name>Jack Halpin</name>
<email>jack.halpin@gmail.com</email>
</author>
<published>2009-11-07T22:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=50d75f35e9aad9f5c54cb9a1e5fb12ac70fc19ae'/>
<id>50d75f35e9aad9f5c54cb9a1e5fb12ac70fc19ae</id>
<content type='text'>
Add SD_SD_STATUS(ACMD13), SD_SET_WR_BLK_ERASE_COUNT(ACMD23), SD_PROGRAM_CSD(CMD27).

Add #define SD_R1_CARD_ERROR to make card error checking easier.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23560 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add SD_SD_STATUS(ACMD13), SD_SET_WR_BLK_ERASE_COUNT(ACMD23), SD_PROGRAM_CSD(CMD27).

Add #define SD_R1_CARD_ERROR to make card error checking easier.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23560 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
<entry>
<title>Add define for SD_SET_CLR_CARD_DETECT  42  /* acmd42 */ to sd.h for use with 4 bit WIDEBUS.</title>
<updated>2009-10-25T05:49:35+00:00</updated>
<author>
<name>Jack Halpin</name>
<email>jack.halpin@gmail.com</email>
</author>
<published>2009-10-25T05:49:35+00:00</published>
<link rel='alternate' type='text/html' href='https://www.franklinwei.com/cgit/rockbox/commit/?id=094dd2b716add372c2334f45d41fdb6591efd4b1'/>
<id>094dd2b716add372c2334f45d41fdb6591efd4b1</id>
<content type='text'>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23340 a1c6a512-1295-4272-9138-f99709370657
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23340 a1c6a512-1295-4272-9138-f99709370657
</pre>
</div>
</content>
</entry>
</feed>
