Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Bhupesh Sharma | 8238f34 | 2015-07-01 09:58:03 +0530 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2015 Freescale Semiconductor |
| 4 | * |
Bhupesh Sharma | 8238f34 | 2015-07-01 09:58:03 +0530 | [diff] [blame] | 5 | * Extracted from gic_64.S |
| 6 | */ |
| 7 | |
| 8 | #include <config.h> |
| 9 | #include <linux/linkage.h> |
| 10 | #include <asm/macro.h> |
| 11 | |
| 12 | /************************************************************************* |
| 13 | * |
| 14 | * void ccn504_add_masters_to_dvm(CCI_MN_BASE, CCI_MN_RNF_NODEID_LIST, |
Wolfgang Denk | 62fb2b4 | 2021-09-27 17:42:39 +0200 | [diff] [blame] | 15 | * CCI_MN_DVM_DOMAIN_CTL_SET); |
Bhupesh Sharma | 8238f34 | 2015-07-01 09:58:03 +0530 | [diff] [blame] | 16 | * |
| 17 | * Add fully-coherent masters to DVM domain |
| 18 | * |
| 19 | *************************************************************************/ |
| 20 | ENTRY(ccn504_add_masters_to_dvm) |
| 21 | /* |
| 22 | * x0: CCI_MN_BASE |
| 23 | * x1: CCI_MN_RNF_NODEID_LIST |
| 24 | * x2: CCI_MN_DVM_DOMAIN_CTL_SET |
| 25 | */ |
| 26 | |
| 27 | /* Add fully-coherent masters to DVM domain */ |
| 28 | ldr x9, [x0, x1] |
| 29 | str x9, [x0, x2] |
| 30 | 1: ldr x10, [x0, x2] |
| 31 | mvn x11, x10 |
| 32 | tst x11, x10 /* Wait for domain addition to complete */ |
| 33 | b.ne 1b |
| 34 | |
| 35 | ret |
| 36 | ENDPROC(ccn504_add_masters_to_dvm) |
| 37 | |
| 38 | /************************************************************************* |
| 39 | * |
| 40 | * void ccn504_set_qos(CCI_Sx_QOS_CONTROL_BASE, QoS Value); |
| 41 | * |
| 42 | * Initialize QoS settings for AR/AW override. |
| 43 | * Right now, this function sets the same QoS value for all RN-I ports |
| 44 | * |
| 45 | *************************************************************************/ |
| 46 | ENTRY(ccn504_set_qos) |
| 47 | /* |
| 48 | * x0: CCI_Sx_QOS_CONTROL_BASE |
| 49 | * x1: QoS Value |
| 50 | */ |
| 51 | |
| 52 | /* Set all RN-I ports to QoS value denoted by x1 */ |
| 53 | ldr x9, [x0] |
| 54 | mov x10, x1 |
| 55 | orr x9, x9, x10 |
| 56 | str x9, [x0] |
| 57 | |
| 58 | ret |
| 59 | ENDPROC(ccn504_set_qos) |
| 60 | |
Prabhakar Kushwaha | edbbd25 | 2016-01-25 12:08:45 +0530 | [diff] [blame] | 61 | /************************************************************************* |
| 62 | * |
| 63 | * void ccn504_set_aux(CCI_AUX_CONTROL_BASE, Value); |
| 64 | * |
| 65 | * Initialize AUX control settings |
| 66 | * |
| 67 | *************************************************************************/ |
| 68 | ENTRY(ccn504_set_aux) |
| 69 | /* |
| 70 | * x0: CCI_AUX_CONTROL_BASE |
| 71 | * x1: Value |
| 72 | */ |
| 73 | |
| 74 | ldr x9, [x0] |
| 75 | mov x10, x1 |
| 76 | orr x9, x9, x10 |
| 77 | str x9, [x0] |
| 78 | |
| 79 | ret |
| 80 | ENDPROC(ccn504_set_aux) |