diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2010-06-30 02:02:46 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2010-06-30 02:02:46 +0000 |
commit | e286b0bbc04a34c181978efce19c6d0814e228c0 (patch) | |
tree | 841288761e20dc9a7a25e5ba83306adf52547d65 /firmware/target/arm/imx31/sdma-imx31.c | |
parent | f4a00174b50c209f2a23b7a73fe7cb544ef59d02 (diff) | |
download | rockbox-e286b0bbc04a34c181978efce19c6d0814e228c0.tar.gz rockbox-e286b0bbc04a34c181978efce19c6d0814e228c0.zip |
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
Diffstat (limited to 'firmware/target/arm/imx31/sdma-imx31.c')
-rw-r--r-- | firmware/target/arm/imx31/sdma-imx31.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/target/arm/imx31/sdma-imx31.c b/firmware/target/arm/imx31/sdma-imx31.c index 4928108f67..381e589c08 100644 --- a/firmware/target/arm/imx31/sdma-imx31.c +++ b/firmware/target/arm/imx31/sdma-imx31.c | |||
@@ -414,12 +414,12 @@ static void set_channel_ownership(unsigned int channel, unsigned int config) | |||
414 | 414 | ||
415 | /* DSP side */ | 415 | /* DSP side */ |
416 | #if 0 /* Not using this */ | 416 | #if 0 /* Not using this */ |
417 | imx31_regmod32(&SDMA_DSPOVR, (config & CH_OWNSHP_DSP) ? 0 : bit, bit); | 417 | bitmod32(&SDMA_DSPOVR, (config & CH_OWNSHP_DSP) ? 0 : bit, bit); |
418 | #endif | 418 | #endif |
419 | /* Event */ | 419 | /* Event */ |
420 | imx31_regmod32(&SDMA_EVTOVR, (config & CH_OWNSHP_EVT) ? 0 : bit, bit); | 420 | bitmod32(&SDMA_EVTOVR, (config & CH_OWNSHP_EVT) ? 0 : bit, bit); |
421 | /* MCU side */ | 421 | /* MCU side */ |
422 | imx31_regmod32(&SDMA_HOSTOVR, (config & CH_OWNSHP_MCU) ? 0 : bit, bit); | 422 | bitmod32(&SDMA_HOSTOVR, (config & CH_OWNSHP_MCU) ? 0 : bit, bit); |
423 | } | 423 | } |
424 | 424 | ||
425 | static bool setup_channel(struct channel_control_block *ccb_p) | 425 | static bool setup_channel(struct channel_control_block *ccb_p) |
@@ -485,12 +485,12 @@ static bool setup_channel(struct channel_control_block *ccb_p) | |||
485 | if (channel_cfg & CH_OWNSHP_EVT) | 485 | if (channel_cfg & CH_OWNSHP_EVT) |
486 | { | 486 | { |
487 | /* Set event ID to channel activation bitmapping */ | 487 | /* Set event ID to channel activation bitmapping */ |
488 | imx31_regset32(&SDMA_CHNENBL(cd_p->event_id1), 1ul << channel); | 488 | bitset32(&SDMA_CHNENBL(cd_p->event_id1), 1ul << channel); |
489 | 489 | ||
490 | if (cd_p->per_type == SDMA_PER_ATA) | 490 | if (cd_p->per_type == SDMA_PER_ATA) |
491 | { | 491 | { |
492 | /* ATA has two */ | 492 | /* ATA has two */ |
493 | imx31_regset32(&SDMA_CHNENBL(cd_p->event_id2), 1ul << channel); | 493 | bitset32(&SDMA_CHNENBL(cd_p->event_id2), 1ul << channel); |
494 | } | 494 | } |
495 | } | 495 | } |
496 | 496 | ||
@@ -676,7 +676,7 @@ void sdma_channel_stop(unsigned int channel) | |||
676 | 676 | ||
677 | /* Unlock callback if it was set */ | 677 | /* Unlock callback if it was set */ |
678 | if (intmsk & chmsk) | 678 | if (intmsk & chmsk) |
679 | imx31_regset32(&sdma_enabled_ints, chmsk); | 679 | bitset32(&sdma_enabled_ints, chmsk); |
680 | 680 | ||
681 | logf("SDMA ch closed: %d", channel); | 681 | logf("SDMA ch closed: %d", channel); |
682 | } | 682 | } |
@@ -721,7 +721,7 @@ bool sdma_channel_init(unsigned int channel, | |||
721 | 721 | ||
722 | /* Enable interrupt if a callback is specified. */ | 722 | /* Enable interrupt if a callback is specified. */ |
723 | if (cd_p->callback != NULL) | 723 | if (cd_p->callback != NULL) |
724 | imx31_regset32(&sdma_enabled_ints, 1ul << channel); | 724 | bitset32(&sdma_enabled_ints, 1ul << channel); |
725 | 725 | ||
726 | /* Minimum schedulable = 1 */ | 726 | /* Minimum schedulable = 1 */ |
727 | sdma_channel_set_priority(channel, 1); | 727 | sdma_channel_set_priority(channel, 1); |
@@ -741,7 +741,7 @@ void sdma_channel_close(unsigned int channel) | |||
741 | ccb_p = &ccb_array[channel]; | 741 | ccb_p = &ccb_array[channel]; |
742 | 742 | ||
743 | /* Block callbacks (if not initialized, it won't be set). */ | 743 | /* Block callbacks (if not initialized, it won't be set). */ |
744 | imx31_regclr32(&sdma_enabled_ints, 1ul << channel); | 744 | bitclr32(&sdma_enabled_ints, 1ul << channel); |
745 | 745 | ||
746 | if (ccb_p->status.opened_init == 0) | 746 | if (ccb_p->status.opened_init == 0) |
747 | return; | 747 | return; |