~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/soc/arc/mcip.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/soc/arc/mcip.h (Version linux-6.12-rc7) and /include/soc/arc/mcip.h (Version linux-6.5.13)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*                                                  2 /*
  3  * ARConnect IP Support (Multi core enabler: C      3  * ARConnect IP Support (Multi core enabler: Cross core IPI, RTC ...)
  4  *                                                  4  *
  5  * Copyright (C) 2014-15 Synopsys, Inc. (www.s      5  * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
  6  */                                                 6  */
  7                                                     7 
  8 #ifndef __SOC_ARC_MCIP_H                            8 #ifndef __SOC_ARC_MCIP_H
  9 #define __SOC_ARC_MCIP_H                            9 #define __SOC_ARC_MCIP_H
 10                                                    10 
 11 #include <soc/arc/aux.h>                           11 #include <soc/arc/aux.h>
 12                                                    12 
 13 #define ARC_REG_MCIP_BCR        0x0d0              13 #define ARC_REG_MCIP_BCR        0x0d0
 14 #define ARC_REG_MCIP_IDU_BCR    0x0D5              14 #define ARC_REG_MCIP_IDU_BCR    0x0D5
 15 #define ARC_REG_GFRC_BUILD      0x0D6              15 #define ARC_REG_GFRC_BUILD      0x0D6
 16 #define ARC_REG_MCIP_CMD        0x600              16 #define ARC_REG_MCIP_CMD        0x600
 17 #define ARC_REG_MCIP_WDATA      0x601              17 #define ARC_REG_MCIP_WDATA      0x601
 18 #define ARC_REG_MCIP_READBACK   0x602              18 #define ARC_REG_MCIP_READBACK   0x602
 19                                                    19 
 20 struct mcip_cmd {                                  20 struct mcip_cmd {
 21 #ifdef CONFIG_CPU_BIG_ENDIAN                       21 #ifdef CONFIG_CPU_BIG_ENDIAN
 22         unsigned int pad:8, param:16, cmd:8;       22         unsigned int pad:8, param:16, cmd:8;
 23 #else                                              23 #else
 24         unsigned int cmd:8, param:16, pad:8;       24         unsigned int cmd:8, param:16, pad:8;
 25 #endif                                             25 #endif
 26                                                    26 
 27 #define CMD_INTRPT_GENERATE_IRQ         0x01       27 #define CMD_INTRPT_GENERATE_IRQ         0x01
 28 #define CMD_INTRPT_GENERATE_ACK         0x02       28 #define CMD_INTRPT_GENERATE_ACK         0x02
 29 #define CMD_INTRPT_READ_STATUS          0x03       29 #define CMD_INTRPT_READ_STATUS          0x03
 30 #define CMD_INTRPT_CHECK_SOURCE         0x04       30 #define CMD_INTRPT_CHECK_SOURCE         0x04
 31                                                    31 
 32 /* Semaphore Commands */                           32 /* Semaphore Commands */
 33 #define CMD_SEMA_CLAIM_AND_READ         0x11       33 #define CMD_SEMA_CLAIM_AND_READ         0x11
 34 #define CMD_SEMA_RELEASE                0x12       34 #define CMD_SEMA_RELEASE                0x12
 35                                                    35 
 36 #define CMD_DEBUG_SET_MASK              0x34       36 #define CMD_DEBUG_SET_MASK              0x34
 37 #define CMD_DEBUG_READ_MASK             0x35       37 #define CMD_DEBUG_READ_MASK             0x35
 38 #define CMD_DEBUG_SET_SELECT            0x36       38 #define CMD_DEBUG_SET_SELECT            0x36
 39 #define CMD_DEBUG_READ_SELECT           0x37       39 #define CMD_DEBUG_READ_SELECT           0x37
 40                                                    40 
 41 #define CMD_GFRC_READ_LO                0x42       41 #define CMD_GFRC_READ_LO                0x42
 42 #define CMD_GFRC_READ_HI                0x43       42 #define CMD_GFRC_READ_HI                0x43
 43 #define CMD_GFRC_SET_CORE               0x47       43 #define CMD_GFRC_SET_CORE               0x47
 44 #define CMD_GFRC_READ_CORE              0x48       44 #define CMD_GFRC_READ_CORE              0x48
 45                                                    45 
 46 #define CMD_IDU_ENABLE                  0x71       46 #define CMD_IDU_ENABLE                  0x71
 47 #define CMD_IDU_DISABLE                 0x72       47 #define CMD_IDU_DISABLE                 0x72
 48 #define CMD_IDU_SET_MODE                0x74       48 #define CMD_IDU_SET_MODE                0x74
 49 #define CMD_IDU_READ_MODE               0x75       49 #define CMD_IDU_READ_MODE               0x75
 50 #define CMD_IDU_SET_DEST                0x76       50 #define CMD_IDU_SET_DEST                0x76
 51 #define CMD_IDU_ACK_CIRQ                0x79       51 #define CMD_IDU_ACK_CIRQ                0x79
 52 #define CMD_IDU_SET_MASK                0x7C       52 #define CMD_IDU_SET_MASK                0x7C
 53                                                    53 
 54 #define IDU_M_TRIG_LEVEL                0x0        54 #define IDU_M_TRIG_LEVEL                0x0
 55 #define IDU_M_TRIG_EDGE                 0x1        55 #define IDU_M_TRIG_EDGE                 0x1
 56                                                    56 
 57 #define IDU_M_DISTRI_RR                 0x0        57 #define IDU_M_DISTRI_RR                 0x0
 58 #define IDU_M_DISTRI_DEST               0x2        58 #define IDU_M_DISTRI_DEST               0x2
 59 };                                                 59 };
 60                                                    60 
 61 struct mcip_bcr {                                  61 struct mcip_bcr {
 62 #ifdef CONFIG_CPU_BIG_ENDIAN                       62 #ifdef CONFIG_CPU_BIG_ENDIAN
 63                 unsigned int pad4:6, pw_dom:1,     63                 unsigned int pad4:6, pw_dom:1, pad3:1,
 64                              idu:1, pad2:1, nu     64                              idu:1, pad2:1, num_cores:6,
 65                              pad:1,  gfrc:1, d     65                              pad:1,  gfrc:1, dbg:1, pw:1,
 66                              msg:1, sem:1, ipi     66                              msg:1, sem:1, ipi:1, slv:1,
 67                              ver:8;                67                              ver:8;
 68 #else                                              68 #else
 69                 unsigned int ver:8,                69                 unsigned int ver:8,
 70                              slv:1, ipi:1, sem     70                              slv:1, ipi:1, sem:1, msg:1,
 71                              pw:1, dbg:1, gfrc     71                              pw:1, dbg:1, gfrc:1, pad:1,
 72                              num_cores:6, pad2     72                              num_cores:6, pad2:1, idu:1,
 73                              pad3:1, pw_dom:1,     73                              pad3:1, pw_dom:1, pad4:6;
 74 #endif                                             74 #endif
 75 };                                                 75 };
 76                                                    76 
 77 struct mcip_idu_bcr {                              77 struct mcip_idu_bcr {
 78 #ifdef CONFIG_CPU_BIG_ENDIAN                       78 #ifdef CONFIG_CPU_BIG_ENDIAN
 79         unsigned int pad:21, cirqnum:3, ver:8;     79         unsigned int pad:21, cirqnum:3, ver:8;
 80 #else                                              80 #else
 81         unsigned int ver:8, cirqnum:3, pad:21;     81         unsigned int ver:8, cirqnum:3, pad:21;
 82 #endif                                             82 #endif
 83 };                                                 83 };
 84                                                    84 
 85                                                    85 
 86 /*                                                 86 /*
 87  * Build register for IDU contains not an actu     87  * Build register for IDU contains not an actual number of supported common
 88  * interrupts but an exponent of 2 which must      88  * interrupts but an exponent of 2 which must be multiplied by 4 to
 89  * get a number of supported common interrupts     89  * get a number of supported common interrupts.
 90  */                                                90  */
 91 #define mcip_idu_bcr_to_nr_irqs(bcr) (4 * (1 <     91 #define mcip_idu_bcr_to_nr_irqs(bcr) (4 * (1 << (bcr).cirqnum))
 92                                                    92 
 93 /*                                                 93 /*
 94  * MCIP programming model                          94  * MCIP programming model
 95  *                                                 95  *
 96  * - Simple commands write {cmd:8,param:16} to     96  * - Simple commands write {cmd:8,param:16} to MCIP_CMD aux reg
 97  *   (param could be irq, common_irq, core_id      97  *   (param could be irq, common_irq, core_id ...)
 98  * - More involved commands setup MCIP_WDATA w     98  * - More involved commands setup MCIP_WDATA with cmd specific data
 99  *   before invoking the simple command            99  *   before invoking the simple command
100  */                                               100  */
101 static inline void __mcip_cmd(unsigned int cmd    101 static inline void __mcip_cmd(unsigned int cmd, unsigned int param)
102 {                                                 102 {
103         struct mcip_cmd buf;                      103         struct mcip_cmd buf;
104                                                   104 
105         buf.pad = 0;                              105         buf.pad = 0;
106         buf.cmd = cmd;                            106         buf.cmd = cmd;
107         buf.param = param;                        107         buf.param = param;
108                                                   108 
109         WRITE_AUX(ARC_REG_MCIP_CMD, buf);         109         WRITE_AUX(ARC_REG_MCIP_CMD, buf);
110 }                                                 110 }
111                                                   111 
112 /*                                                112 /*
113  * Setup additional data for a cmd                113  * Setup additional data for a cmd
114  * Callers need to lock to ensure atomicity       114  * Callers need to lock to ensure atomicity
115  */                                               115  */
116 static inline void __mcip_cmd_data(unsigned in    116 static inline void __mcip_cmd_data(unsigned int cmd, unsigned int param,
117                                    unsigned in    117                                    unsigned int data)
118 {                                                 118 {
119         write_aux_reg(ARC_REG_MCIP_WDATA, data    119         write_aux_reg(ARC_REG_MCIP_WDATA, data);
120                                                   120 
121         __mcip_cmd(cmd, param);                   121         __mcip_cmd(cmd, param);
122 }                                                 122 }
123                                                   123 
124 /*                                                124 /*
125  * Read MCIP register                             125  * Read MCIP register
126  */                                               126  */
127 static inline unsigned int __mcip_cmd_read(uns    127 static inline unsigned int __mcip_cmd_read(unsigned int cmd, unsigned int param)
128 {                                                 128 {
129         __mcip_cmd(cmd, param);                   129         __mcip_cmd(cmd, param);
130         return read_aux_reg(ARC_REG_MCIP_READB    130         return read_aux_reg(ARC_REG_MCIP_READBACK);
131 }                                                 131 }
132                                                   132 
133 #endif                                            133 #endif
134                                                   134 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php