Skip to content

Commit 0efa0fc

Browse files
elkabloarndb
authored andcommitted
firmware: turris-mox-rwtm: Document the driver private data structure
Add more comprehensive documentation for the driver private data structure, `struct mox_rwtm`. Signed-off-by: Marek Behún <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent ffca677 commit 0efa0fc

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

drivers/firmware/turris-mox-rwtm.c

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,27 @@ enum mbox_cmd {
6161
MBOX_CMD_OTP_WRITE = 8,
6262
};
6363

64+
/**
65+
* struct mox_rwtm - driver private data structure
66+
* @mbox_client: rWTM mailbox client
67+
* @mbox: rWTM mailbox channel
68+
* @hwrng: RNG driver structure
69+
* @reply: last mailbox reply, filled in receive callback
70+
* @buf: DMA buffer
71+
* @buf_phys: physical address of the DMA buffer
72+
* @busy: mutex to protect mailbox command execution
73+
* @cmd_done: command done completion
74+
* @has_board_info: whether board information is present
75+
* @serial_number: serial number of the device
76+
* @board_version: board version / revision of the device
77+
* @ram_size: RAM size of the device
78+
* @mac_address1: first MAC address of the device
79+
* @mac_address2: second MAC address of the device
80+
* @has_pubkey: whether board ECDSA public key is present
81+
* @pubkey: board ECDSA public key
82+
* @last_sig: last ECDSA signature generated with board ECDSA private key
83+
* @last_sig_done: whether the last ECDSA signing is complete
84+
*/
6485
struct mox_rwtm {
6586
struct mbox_client mbox_client;
6687
struct mbox_chan *mbox;
@@ -74,13 +95,11 @@ struct mox_rwtm {
7495
struct mutex busy;
7596
struct completion cmd_done;
7697

77-
/* board information */
7898
bool has_board_info;
7999
u64 serial_number;
80100
int board_version, ram_size;
81101
u8 mac_address1[ETH_ALEN], mac_address2[ETH_ALEN];
82102

83-
/* public key burned in eFuse */
84103
bool has_pubkey;
85104
u8 pubkey[135];
86105

0 commit comments

Comments
 (0)