aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/soc/imx/gpc.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c
index 32f0748fd067..0097a939487f 100644
--- a/drivers/soc/imx/gpc.c
+++ b/drivers/soc/imx/gpc.c
@@ -27,9 +27,16 @@
27#define GPC_PGC_SW2ISO_SHIFT 0x8 27#define GPC_PGC_SW2ISO_SHIFT 0x8
28#define GPC_PGC_SW_SHIFT 0x0 28#define GPC_PGC_SW_SHIFT 0x0
29 29
30#define GPC_PGC_PCI_PDN 0x200
31#define GPC_PGC_PCI_SR 0x20c
32
30#define GPC_PGC_GPU_PDN 0x260 33#define GPC_PGC_GPU_PDN 0x260
31#define GPC_PGC_GPU_PUPSCR 0x264 34#define GPC_PGC_GPU_PUPSCR 0x264
32#define GPC_PGC_GPU_PDNSCR 0x268 35#define GPC_PGC_GPU_PDNSCR 0x268
36#define GPC_PGC_GPU_SR 0x26c
37
38#define GPC_PGC_DISP_PDN 0x240
39#define GPC_PGC_DISP_SR 0x24c
33 40
34#define GPU_VPU_PUP_REQ BIT(1) 41#define GPU_VPU_PUP_REQ BIT(1)
35#define GPU_VPU_PDN_REQ BIT(0) 42#define GPU_VPU_PDN_REQ BIT(0)
@@ -318,10 +325,24 @@ static const struct of_device_id imx_gpc_dt_ids[] = {
318 { } 325 { }
319}; 326};
320 327
328static const struct regmap_range yes_ranges[] = {
329 regmap_reg_range(GPC_CNTR, GPC_CNTR),
330 regmap_reg_range(GPC_PGC_PCI_PDN, GPC_PGC_PCI_SR),
331 regmap_reg_range(GPC_PGC_GPU_PDN, GPC_PGC_GPU_SR),
332 regmap_reg_range(GPC_PGC_DISP_PDN, GPC_PGC_DISP_SR),
333};
334
335static const struct regmap_access_table access_table = {
336 .yes_ranges = yes_ranges,
337 .n_yes_ranges = ARRAY_SIZE(yes_ranges),
338};
339
321static const struct regmap_config imx_gpc_regmap_config = { 340static const struct regmap_config imx_gpc_regmap_config = {
322 .reg_bits = 32, 341 .reg_bits = 32,
323 .val_bits = 32, 342 .val_bits = 32,
324 .reg_stride = 4, 343 .reg_stride = 4,
344 .rd_table = &access_table,
345 .wr_table = &access_table,
325 .max_register = 0x2ac, 346 .max_register = 0x2ac,
326}; 347};
327 348