diff options
Diffstat (limited to 'arch/arm/common/pl330.c')
-rw-r--r-- | arch/arm/common/pl330.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/common/pl330.c b/arch/arm/common/pl330.c index 7129cfbdacd6..f407a6b35d3d 100644 --- a/arch/arm/common/pl330.c +++ b/arch/arm/common/pl330.c | |||
@@ -1211,8 +1211,8 @@ static inline u32 _prepare_ccr(const struct pl330_reqcfg *rqc) | |||
1211 | ccr |= (rqc->brst_size << CC_SRCBRSTSIZE_SHFT); | 1211 | ccr |= (rqc->brst_size << CC_SRCBRSTSIZE_SHFT); |
1212 | ccr |= (rqc->brst_size << CC_DSTBRSTSIZE_SHFT); | 1212 | ccr |= (rqc->brst_size << CC_DSTBRSTSIZE_SHFT); |
1213 | 1213 | ||
1214 | ccr |= (rqc->dcctl << CC_SRCCCTRL_SHFT); | 1214 | ccr |= (rqc->scctl << CC_SRCCCTRL_SHFT); |
1215 | ccr |= (rqc->scctl << CC_DSTCCTRL_SHFT); | 1215 | ccr |= (rqc->dcctl << CC_DSTCCTRL_SHFT); |
1216 | 1216 | ||
1217 | ccr |= (rqc->swap << CC_SWAP_SHFT); | 1217 | ccr |= (rqc->swap << CC_SWAP_SHFT); |
1218 | 1218 | ||
@@ -1623,6 +1623,11 @@ static inline int _alloc_event(struct pl330_thread *thrd) | |||
1623 | return -1; | 1623 | return -1; |
1624 | } | 1624 | } |
1625 | 1625 | ||
1626 | static bool _chan_ns(const struct pl330_info *pi, int i) | ||
1627 | { | ||
1628 | return pi->pcfg.irq_ns & (1 << i); | ||
1629 | } | ||
1630 | |||
1626 | /* Upon success, returns IdentityToken for the | 1631 | /* Upon success, returns IdentityToken for the |
1627 | * allocated channel, NULL otherwise. | 1632 | * allocated channel, NULL otherwise. |
1628 | */ | 1633 | */ |
@@ -1647,7 +1652,8 @@ void *pl330_request_channel(const struct pl330_info *pi) | |||
1647 | 1652 | ||
1648 | for (i = 0; i < chans; i++) { | 1653 | for (i = 0; i < chans; i++) { |
1649 | thrd = &pl330->channels[i]; | 1654 | thrd = &pl330->channels[i]; |
1650 | if (thrd->free) { | 1655 | if ((thrd->free) && (!_manager_ns(thrd) || |
1656 | _chan_ns(pi, i))) { | ||
1651 | thrd->ev = _alloc_event(thrd); | 1657 | thrd->ev = _alloc_event(thrd); |
1652 | if (thrd->ev >= 0) { | 1658 | if (thrd->ev >= 0) { |
1653 | thrd->free = false; | 1659 | thrd->free = false; |