Lines Matching refs:gsi
13 static bool gsi_reg_id_valid(struct gsi *gsi, enum gsi_reg_id reg_id) in gsi_reg_id_valid() argument
18 return gsi->version >= IPA_VERSION_3_5; in gsi_reg_id_valid()
21 return gsi->version >= IPA_VERSION_3_5_1; in gsi_reg_id_valid()
24 return gsi->version >= IPA_VERSION_5_0; in gsi_reg_id_valid()
82 const struct reg *gsi_reg(struct gsi *gsi, enum gsi_reg_id reg_id) in gsi_reg() argument
84 if (WARN(!gsi_reg_id_valid(gsi, reg_id), "invalid reg %u\n", reg_id)) in gsi_reg()
87 return reg(gsi->regs, reg_id); in gsi_reg()
90 static const struct regs *gsi_regs(struct gsi *gsi) in gsi_regs() argument
92 switch (gsi->version) { in gsi_regs()
121 int gsi_reg_init(struct gsi *gsi, struct platform_device *pdev) in gsi_reg_init() argument
140 gsi->regs = gsi_regs(gsi); in gsi_reg_init()
141 if (!gsi->regs) { in gsi_reg_init()
142 dev_err(dev, "unsupported IPA version %u (?)\n", gsi->version); in gsi_reg_init()
146 gsi->virt = ioremap(res->start, size); in gsi_reg_init()
147 if (!gsi->virt) { in gsi_reg_init()
156 void gsi_reg_exit(struct gsi *gsi) in gsi_reg_exit() argument
158 iounmap(gsi->virt); in gsi_reg_exit()
159 gsi->virt = NULL; in gsi_reg_exit()
160 gsi->regs = NULL; in gsi_reg_exit()