mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27188 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f4a00174b5
commit
e286b0bbc0
28 changed files with 271 additions and 190 deletions
|
|
@ -85,17 +85,17 @@ void ide_power_enable(bool on)
|
|||
if (!on)
|
||||
{
|
||||
/* Bus must be isolated before power off */
|
||||
imx31_regset32(&GPIO2_DR, (1 << 16));
|
||||
bitset32(&GPIO2_DR, (1 << 16));
|
||||
}
|
||||
|
||||
/* HD power switch */
|
||||
imx31_regmod32(&GPIO3_DR, on ? (1 << 5) : 0, (1 << 5));
|
||||
bitmod32(&GPIO3_DR, on ? (1 << 5) : 0, (1 << 5));
|
||||
|
||||
if (on)
|
||||
{
|
||||
/* Bus switch may be turned on after powerup */
|
||||
sleep(HZ/10);
|
||||
imx31_regclr32(&GPIO2_DR, (1 << 16));
|
||||
bitclr32(&GPIO2_DR, (1 << 16));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue