Skip to content

Commit

Permalink
WIP: interconnect: qcom: update msm8998 to use shared code
Browse files Browse the repository at this point in the history
  • Loading branch information
calebccff committed Feb 26, 2022
1 parent d367b4b commit b6d284a
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 545 deletions.
21 changes: 20 additions & 1 deletion drivers/interconnect/qcom/icc-rpm.h
Expand Up @@ -9,6 +9,8 @@
#define RPM_BUS_MASTER_REQ 0x73616d62
#define RPM_BUS_SLAVE_REQ 0x766c7362

#define MAX_LINKS 128

#define to_qcom_provider(_provider) \
container_of(_provider, struct qcom_icc_provider, provider)

Expand Down Expand Up @@ -71,7 +73,7 @@ struct qcom_icc_qos {
struct qcom_icc_node {
unsigned char *name;
u16 id;
const u16 *links;
const u16 links[MAX_LINKS];
u16 num_links;
u16 buswidth;
int mas_rpm_id;
Expand All @@ -96,6 +98,23 @@ struct qcom_icc_desc {
#define NOC_QOS_MODE_FIXED 0x0
#define NOC_QOS_MODE_BYPASS 0x2

#define DEFINE_QNODE(_name, _id, _buswidth, _mas_rpm_id, _slv_rpm_id, \
_ap_owned, _qos_mode, _qos_prio, _qos_port, ...) \
static struct qcom_icc_node _name = { \
.name = #_name, \
.id = _id, \
.buswidth = _buswidth, \
.mas_rpm_id = _mas_rpm_id, \
.slv_rpm_id = _slv_rpm_id, \
.qos.ap_owned = _ap_owned, \
.qos.qos_mode = _qos_mode, \
.qos.areq_prio = _qos_prio, \
.qos.prio_level = _qos_prio, \
.qos.qos_port = _qos_port, \
.num_links = ARRAY_SIZE(((int[]){ __VA_ARGS__ })), \
.links = { __VA_ARGS__ }, \
}

int qnoc_probe(struct platform_device *pdev);
int qnoc_remove(struct platform_device *pdev);

Expand Down

0 comments on commit b6d284a

Please sign in to comment.