@@ -41,33 +41,34 @@ enum pq_init_status {
4141/*
4242 * ArmCP Primary Queue Packets
4343 *
44- * During normal operation, KMD needs to send various messages to ArmCP,
45- * usually either to SET some value into a H/W periphery or to GET the current
46- * value of some H/W periphery. For example, SET the frequency of MME/TPC and
47- * GET the value of the thermal sensor.
48- *
49- * These messages can be initiated either by the User application or by KMD
50- * itself, e.g. power management code. In either case, the communication from
51- * KMD to ArmCP will *always* be in synchronous mode, meaning that KMD will
52- * send a single message and poll until the message was acknowledged and the
53- * results are ready (if results are needed).
54- *
55- * This means that only a single message can be sent at a time and KMD must
56- * wait for its result before sending the next message. Having said that,
57- * because these are control messages which are sent in a relatively low
44+ * During normal operation, the host's kernel driver needs to send various
45+ * messages to ArmCP, usually either to SET some value into a H/W periphery or
46+ * to GET the current value of some H/W periphery. For example, SET the
47+ * frequency of MME/TPC and GET the value of the thermal sensor.
48+ *
49+ * These messages can be initiated either by the User application or by the
50+ * host's driver itself, e.g. power management code. In either case, the
51+ * communication from the host's driver to ArmCP will *always* be in
52+ * synchronous mode, meaning that the host will send a single message and poll
53+ * until the message was acknowledged and the results are ready (if results are
54+ * needed).
55+ *
56+ * This means that only a single message can be sent at a time and the host's
57+ * driver must wait for its result before sending the next message. Having said
58+ * that, because these are control messages which are sent in a relatively low
5859 * frequency, this limitation seems acceptable. It's important to note that
5960 * in case of multiple devices, messages to different devices *can* be sent
6061 * at the same time.
6162 *
6263 * The message, inputs/outputs (if relevant) and fence object will be located
63- * on the device DDR at an address that will be determined by KMD. During
64- * device initialization phase, KMD will pass to ArmCP that address. Most of
65- * the message types will contain inputs/outputs inside the message itself.
66- * The common part of each message will contain the opcode of the message (its
67- * type) and a field representing a fence object.
68- *
69- * When KMD wishes to send a message to ArmCP, it will write the message
70- * contents to the device DDR, clear the fence object and then write the
64+ * on the device DDR at an address that will be determined by the host's driver.
65+ * During device initialization phase, the host will pass to ArmCP that address.
66+ * Most of the message types will contain inputs/outputs inside the message
67+ * itself. The common part of each message will contain the opcode of the
68+ * message (its type) and a field representing a fence object.
69+ *
70+ * When the host's driver wishes to send a message to ArmCP, it will write the
71+ * message contents to the device DDR, clear the fence object and then write the
7172 * value 484 to the mmGIC_DISTRIBUTOR__5_GICD_SETSPI_NSR register to issue
7273 * the 484 interrupt-id to the ARM core.
7374 *
@@ -78,12 +79,13 @@ enum pq_init_status {
7879 * device DDR and then write to the fence object. If an error occurred, ArmCP
7980 * will fill the rc field with the right error code.
8081 *
81- * In the meantime, KMD will poll on the fence object. Once KMD sees that the
82- * fence object is signaled, it will read the results from the device DDR
83- * (if relevant) and resume the code execution in KMD.
82+ * In the meantime, the host's driver will poll on the fence object. Once the
83+ * host sees that the fence object is signaled, it will read the results from
84+ * the device DDR (if relevant) and resume the code execution in the host's
85+ * driver.
8486 *
8587 * To use QMAN packets, the opcode must be the QMAN opcode, shifted by 8
86- * so the value being put by the KMD matches the value read by ArmCP
88+ * so the value being put by the host's driver matches the value read by ArmCP
8789 *
8890 * Non-QMAN packets should be limited to values 1 through (2^8 - 1)
8991 *
@@ -148,9 +150,9 @@ enum pq_init_status {
148150 *
149151 * ARMCP_PACKET_INFO_GET -
150152 * Fetch information from the device as specified in the packet's
151- * structure. KMD passes the max size it allows the ArmCP to write to
152- * the structure, to prevent data corruption in case of mismatched
153- * KMD /FW versions.
153+ * structure. The host's driver passes the max size it allows the ArmCP to
154+ * write to the structure, to prevent data corruption in case of
155+ * mismatched driver /FW versions.
154156 *
155157 * ARMCP_PACKET_FLASH_PROGRAM_REMOVED - this packet was removed
156158 *
@@ -183,9 +185,9 @@ enum pq_init_status {
183185 * ARMCP_PACKET_EEPROM_DATA_GET -
184186 * Get EEPROM data from the ArmCP kernel. The buffer is specified in the
185187 * addr field. The CPU will put the returned data size in the result
186- * field. In addition, KMD passes the max size it allows the ArmCP to
187- * write to the structure, to prevent data corruption in case of
188- * mismatched KMD /FW versions.
188+ * field. In addition, the host's driver passes the max size it allows the
189+ * ArmCP to write to the structure, to prevent data corruption in case of
190+ * mismatched driver /FW versions.
189191 *
190192 */
191193
@@ -231,7 +233,7 @@ struct armcp_packet {
231233
232234 __le32 ctl ;
233235
234- __le32 fence ; /* Signal to KMD that message is completed */
236+ __le32 fence ; /* Signal to host that message is completed */
235237
236238 union {
237239 struct {/* For temperature/current/voltage/fan/pwm get/set */
@@ -320,7 +322,7 @@ struct armcp_sensor {
320322};
321323
322324/**
323- * struct armcp_info - host driver's necessary info from ArmCP.
325+ * struct armcp_info - Info from ArmCP that is necessary to the host's driver
324326 * @sensors: available sensors description.
325327 * @kernel_version: ArmCP linux kernel version.
326328 * @reserved: reserved field.
0 commit comments