| /kernel/linux/linux-6.6/drivers/fsi/ |
| D | fsi-occ.c | 16 #include <linux/fsi-occ.h> 42 struct occ { struct 58 #define to_occ(x) container_of((x), struct occ, mdev) argument 69 struct occ *occ; member 84 struct occ *occ = to_occ(mdev); in occ_open() local 95 client->occ = occ; in occ_open() 98 get_device(occ->dev); in occ_open() 160 * Copy the user command (assume user data follows the occ command in occ_write() 180 rc = fsi_occ_submit(client->occ->dev, cmd, data_length + 6, cmd, in occ_write() 202 put_device(client->occ->dev); in occ_release() [all …]
|
| /kernel/linux/linux-6.6/drivers/hwmon/occ/ |
| D | sysfs.c | 14 /* OCC status register */ 17 /* OCC extended status register */ 31 struct occ *occ = dev_get_drvdata(dev); in occ_active_store() local 37 rc = occ_active(occ, active); in occ_active_store() 49 struct occ *occ = dev_get_drvdata(dev); in occ_sysfs_show() local 53 if (occ->active) { in occ_sysfs_show() 54 rc = occ_update_response(occ); in occ_sysfs_show() 58 header = (struct occ_poll_response_header *)occ->resp.data; in occ_sysfs_show() 119 struct occ *occ = dev_get_drvdata(dev); in occ_error_show() local 121 occ_update_response(occ); in occ_error_show() [all …]
|
| D | common.c | 21 #define OCC_ERROR_COUNT_THRESHOLD 2 /* required by OCC spec */ 32 /* OCC sensor type and version definitions */ 133 static int occ_poll(struct occ *occ) in occ_poll() argument 144 cmd[4] = occ->poll_cmd_data; /* data */ in occ_poll() 149 rc = occ->send_cmd(occ, cmd, sizeof(cmd), &occ->resp, sizeof(occ->resp)); in occ_poll() 151 occ->last_error = rc; in occ_poll() 152 if (occ->error_count++ > OCC_ERROR_COUNT_THRESHOLD) in occ_poll() 153 occ->error = rc; in occ_poll() 159 occ->error_count = 0; in occ_poll() 160 occ->last_error = 0; in occ_poll() [all …]
|
| D | p9_sbe.c | 7 #include <linux/fsi-occ.h> 21 struct occ occ; member 30 #define to_p9_sbe_occ(x) container_of((x), struct p9_sbe_occ, occ) 37 struct occ *occ = dev_get_drvdata(kobj_to_dev(kobj)); in ffdc_read() local 38 struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ); in ffdc_read() 83 static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd, size_t len, in p9_sbe_occ_send_cmd() argument 87 struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ); in p9_sbe_occ_send_cmd() 96 sysfs_notify(&occ->bus_dev->kobj, NULL, in p9_sbe_occ_send_cmd() 137 struct occ *occ; in p9_sbe_occ_probe() local 146 occ = &ctx->occ; in p9_sbe_occ_probe() [all …]
|
| D | common.h | 16 * Same response format for all OCC versions. 71 * OCC only provides one sensor data block of each type, but any number of 91 struct occ { struct 98 u8 poll_cmd_data; /* to perform OCC poll command */ 99 int (*send_cmd)(struct occ *occ, u8 *cmd, size_t len, void *resp, argument 103 struct mutex lock; /* lock OCC access */ 114 unsigned long last_safe; /* time OCC entered "safe" state */ 128 int occ_active(struct occ *occ, bool active); argument 129 int occ_setup(struct occ *occ); 130 int occ_setup_sysfs(struct occ *occ); [all …]
|
| D | p8_i2c.c | 6 #include <linux/fsi-occ.h> 18 /* OCB (on-chip control bridge - interface to OCC) registers */ 23 /* OCC SRAM address space */ 30 struct occ occ; member 34 #define to_p8_i2c_occ(x) container_of((x), struct p8_i2c_occ, occ) 51 /* data from OCC is big-endian */ in p8_i2c_occ_getscom() 114 static int p8_i2c_occ_send_cmd(struct occ *occ, u8 *cmd, size_t len, in p8_i2c_occ_send_cmd() argument 122 struct p8_i2c_occ *ctx = to_p8_i2c_occ(occ); in p8_i2c_occ_send_cmd() 138 /* trigger OCC attention */ in p8_i2c_occ_send_cmd() 154 /* wait for OCC */ in p8_i2c_occ_send_cmd() [all …]
|
| D | Kconfig | 7 tristate "POWER8 OCC through I2C" 12 On-Chip Controller (OCC) on a POWER8 processor. However, this driver 14 the P8, not the POWER processor itself. Communications with the OCC are 18 called occ-p8-hwmon. 21 tristate "POWER9 OCC through SBE" 26 On-Chip Controller (OCC) on a POWER9 processor. However, this driver 28 the P9, not the POWER processor itself. Communications with the OCC are 32 called occ-p9-hwmon.
|
| D | Makefile | 2 occ-hwmon-common-objs := common.o sysfs.o 3 occ-p8-hwmon-objs := p8_i2c.o 4 occ-p9-hwmon-objs := p9_sbe.o 6 obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o 7 obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o 8 obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o
|
| /kernel/linux/linux-5.10/drivers/hwmon/occ/ |
| D | sysfs.c | 13 /* OCC status register */ 17 /* OCC extended status register */ 28 struct occ *occ = dev_get_drvdata(dev); in occ_sysfs_show() local 32 rc = occ_update_response(occ); in occ_sysfs_show() 36 header = (struct occ_poll_response_header *)occ->resp.data; in occ_sysfs_show() 76 struct occ *occ = dev_get_drvdata(dev); in occ_error_show() local 78 occ_update_response(occ); in occ_error_show() 80 return snprintf(buf, PAGE_SIZE - 1, "%d\n", occ->error); in occ_error_show() 110 void occ_sysfs_poll_done(struct occ *occ) in occ_sysfs_poll_done() argument 114 (struct occ_poll_response_header *)occ->resp.data; in occ_sysfs_poll_done() [all …]
|
| D | common.c | 20 #define OCC_ERROR_COUNT_THRESHOLD 2 /* required by OCC spec */ 31 /* OCC sensor type and version definitions */ 124 static int occ_poll(struct occ *occ) in occ_poll() argument 127 u16 checksum = occ->poll_cmd_data + occ->seq_no + 1; in occ_poll() 132 cmd[0] = occ->seq_no++; /* sequence number */ in occ_poll() 136 cmd[4] = occ->poll_cmd_data; /* data */ in occ_poll() 142 rc = occ->send_cmd(occ, cmd); in occ_poll() 144 occ->last_error = rc; in occ_poll() 145 if (occ->error_count++ > OCC_ERROR_COUNT_THRESHOLD) in occ_poll() 146 occ->error = rc; in occ_poll() [all …]
|
| D | p9_sbe.c | 6 #include <linux/fsi-occ.h> 13 struct occ occ; member 17 #define to_p9_sbe_occ(x) container_of((x), struct p9_sbe_occ, occ) 19 static int p9_sbe_occ_send_cmd(struct occ *occ, u8 *cmd) in p9_sbe_occ_send_cmd() argument 21 struct occ_response *resp = &occ->resp; in p9_sbe_occ_send_cmd() 22 struct p9_sbe_occ *ctx = to_p9_sbe_occ(occ); in p9_sbe_occ_send_cmd() 62 struct occ *occ; in p9_sbe_occ_probe() local 69 occ = &ctx->occ; in p9_sbe_occ_probe() 70 occ->bus_dev = &pdev->dev; in p9_sbe_occ_probe() 71 platform_set_drvdata(pdev, occ); in p9_sbe_occ_probe() [all …]
|
| D | p8_i2c.c | 6 #include <linux/fsi-occ.h> 18 /* OCB (on-chip control bridge - interface to OCC) registers */ 23 /* OCC SRAM address space */ 30 struct occ occ; member 34 #define to_p8_i2c_occ(x) container_of((x), struct p8_i2c_occ, occ) 51 /* data from OCC is big-endian */ in p8_i2c_occ_getscom() 111 static int p8_i2c_occ_send_cmd(struct occ *occ, u8 *cmd) in p8_i2c_occ_send_cmd() argument 118 struct p8_i2c_occ *ctx = to_p8_i2c_occ(occ); in p8_i2c_occ_send_cmd() 120 struct occ_response *resp = &occ->resp; in p8_i2c_occ_send_cmd() 134 /* trigger OCC attention */ in p8_i2c_occ_send_cmd() [all …]
|
| D | common.h | 16 * Same response format for all OCC versions. 71 * OCC only provides one sensor data block of each type, but any number of 91 struct occ { struct 99 u8 poll_cmd_data; /* to perform OCC poll command */ 100 int (*send_cmd)(struct occ *occ, u8 *cmd); argument 103 struct mutex lock; /* lock OCC access */ 113 unsigned long last_safe; /* time OCC entered "safe" state */ 125 int occ_setup(struct occ *occ, const char *name); argument 126 int occ_setup_sysfs(struct occ *occ); 127 void occ_shutdown(struct occ *occ); [all …]
|
| D | Kconfig | 7 tristate "POWER8 OCC through I2C" 13 On-Chip Controller (OCC) on a POWER8 processor. However, this driver 15 the P8, not the POWER processor itself. Communications with the OCC are 19 called occ-p8-hwmon. 22 tristate "POWER9 OCC through SBE" 28 On-Chip Controller (OCC) on a POWER9 processor. However, this driver 30 the P9, not the POWER processor itself. Communications with the OCC are 34 called occ-p9-hwmon.
|
| D | Makefile | 2 occ-hwmon-common-objs := common.o sysfs.o 3 occ-p8-hwmon-objs := p8_i2c.o 4 occ-p9-hwmon-objs := p9_sbe.o 6 obj-$(CONFIG_SENSORS_OCC) += occ-hwmon-common.o 7 obj-$(CONFIG_SENSORS_OCC_P8_I2C) += occ-p8-hwmon.o 8 obj-$(CONFIG_SENSORS_OCC_P9_SBE) += occ-p9-hwmon.o
|
| /kernel/linux/linux-5.10/drivers/fsi/ |
| D | fsi-occ.c | 15 #include <linux/fsi-occ.h> 40 struct occ { struct 49 #define to_occ(x) container_of((x), struct occ, mdev) argument 60 struct occ *occ; member 75 struct occ *occ = to_occ(mdev); in occ_open() local 86 client->occ = occ; in occ_open() 154 * Copy the user command (assume user data follows the occ command in occ_write() 181 rc = fsi_occ_submit(client->occ->dev, cmd, data_length + 6, cmd, in occ_write() 238 static int occ_getsram(struct occ *occ, u32 address, void *data, ssize_t len) in occ_getsram() argument 260 rc = sbefifo_submit(occ->sbefifo, cmd, 5, resp, &resp_len); in occ_getsram() [all …]
|
| /kernel/linux/linux-6.6/Documentation/hwmon/ |
| D | occ.rst | 1 Kernel driver occ-hwmon 14 This driver supports hardware monitoring for the On-Chip Controller (OCC) 15 embedded on POWER processors. The OCC is a device that collects and aggregates 16 sensor data from the processor and the system. The OCC can provide the raw 20 manually if an "ibm,p8-occ-hwmon" compatible device is found under the 23 The P9 version of this driver is a client driver of the FSI-based OCC driver. 24 It will be probed automatically by the FSI-based OCC driver. 32 The OCC sensor ID is an integer that represents the unique identifier of the 33 sensor with respect to the OCC. For example, a temperature sensor for the third 37 Some entries are only present with certain OCC sensor versions or only on [all …]
|
| D | ibmpowernv.rst | 45 each OCC. Using this attribute each OCC can be asked to 58 each OCC. Using this attribute each OCC can be asked to 69 each OCC. Using this attribute each OCC can be asked to 80 each OCC. Using this attribute each OCC can be asked to
|
| /kernel/linux/linux-5.10/Documentation/hwmon/ |
| D | occ.rst | 1 Kernel driver occ-hwmon 14 This driver supports hardware monitoring for the On-Chip Controller (OCC) 15 embedded on POWER processors. The OCC is a device that collects and aggregates 16 sensor data from the processor and the system. The OCC can provide the raw 20 manually if an "ibm,p8-occ-hwmon" compatible device is found under the 23 The P9 version of this driver is a client driver of the FSI-based OCC driver. 24 It will be probed automatically by the FSI-based OCC driver. 32 The OCC sensor ID is an integer that represents the unique identifier of the 33 sensor with respect to the OCC. For example, a temperature sensor for the third 37 Some entries are only present with certain OCC sensor versions or only on [all …]
|
| D | ibmpowernv.rst | 45 each OCC. Using this attribute each OCC can be asked to 58 each OCC. Using this attribute each OCC can be asked to 69 each OCC. Using this attribute each OCC can be asked to 80 each OCC. Using this attribute each OCC can be asked to
|
| /kernel/linux/linux-5.10/tools/testing/selftests/drivers/net/mlxsw/ |
| D | tc_police_occ.sh | 68 local occ=$(tc_police_occ_get) 73 (( occ + 1 == $(tc_police_occ_get) )) 74 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))" 77 (( occ == $(tc_police_occ_get) )) 78 check_err $? "Got occupancy $(tc_police_occ_get), expected $occ" 87 (( occ + 1 == $(tc_police_occ_get) )) 88 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))" 91 (( occ + 1 == $(tc_police_occ_get) )) 92 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))" 95 (( occ == $(tc_police_occ_get) )) [all …]
|
| /kernel/linux/linux-6.6/tools/testing/selftests/drivers/net/mlxsw/ |
| D | tc_police_occ.sh | 68 local occ=$(tc_police_occ_get) 73 (( occ + 1 == $(tc_police_occ_get) )) 74 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))" 77 (( occ == $(tc_police_occ_get) )) 78 check_err $? "Got occupancy $(tc_police_occ_get), expected $occ" 87 (( occ + 1 == $(tc_police_occ_get) )) 88 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))" 91 (( occ + 1 == $(tc_police_occ_get) )) 92 check_err $? "Got occupancy $(tc_police_occ_get), expected $((occ + 1))" 95 (( occ == $(tc_police_occ_get) )) [all …]
|
| D | port_range_occ.sh | 69 local occ=$(port_range_occ_get) 76 (( occ + 2 == $(port_range_occ_get) )) 77 check_err $? "Got occupancy $(port_range_occ_get), expected $((occ + 2))" 88 (( occ + 2 == $(port_range_occ_get) )) 89 check_err $? "Got occupancy $(port_range_occ_get), expected $((occ + 2))" 94 (( occ + 2 == $(port_range_occ_get) )) 95 check_err $? "Got occupancy $(port_range_occ_get), expected $((occ + 2))" 98 (( occ == $(port_range_occ_get) )) 99 check_err $? "Got occupancy $(port_range_occ_get), expected $occ"
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/hwmon/ |
| D | ibm,occ-hwmon.yaml | 4 $id: http://devicetree.org/schemas/hwmon/ibm,occ-hwmon.yaml# 7 title: IBM On-Chip Controller (OCC) accessed from a service processor 13 The POWER processor On-Chip Controller (OCC) helps manage power and 15 controller can query the OCC for it's power and thermal data to report 21 - ibm,p9-occ-hwmon 22 - ibm,p10-occ-hwmon 25 description: This property describes whether or not the OCC should 37 compatible = "ibm,p10-occ-hwmon";
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/fsi/ |
| D | ibm,p9-occ.txt | 1 Device-tree bindings for FSI-attached POWER9/POWER10 On-Chip Controller (OCC) 6 nodes. The OCC is not an FSI slave device itself, rather it is accessed 10 - compatible = "ibm,p9-occ" or "ibm,p10-occ" 14 occ { 15 compatible = "ibm,p9-occ";
|