~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/soc/amlogic/meson_ddr_pmu.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * Copyright (c) 2022 Amlogic, Inc. All rights reserved.
  4  */
  5 
  6 #ifndef __MESON_DDR_PMU_H__
  7 #define __MESON_DDR_PMU_H__
  8 
  9 #define MAX_CHANNEL_NUM         8
 10 
 11 enum {
 12         ALL_CHAN_COUNTER_ID,
 13         CHAN1_COUNTER_ID,
 14         CHAN2_COUNTER_ID,
 15         CHAN3_COUNTER_ID,
 16         CHAN4_COUNTER_ID,
 17         CHAN5_COUNTER_ID,
 18         CHAN6_COUNTER_ID,
 19         CHAN7_COUNTER_ID,
 20         CHAN8_COUNTER_ID,
 21         COUNTER_MAX_ID,
 22 };
 23 
 24 struct dmc_info;
 25 
 26 struct dmc_counter {
 27         u64 all_cnt;    /* The count of all requests come in/out ddr controller */
 28         union {
 29                 u64 all_req;
 30                 struct {
 31                         u64 all_idle_cnt;
 32                         u64 all_16bit_cnt;
 33                 };
 34         };
 35         u64 channel_cnt[MAX_CHANNEL_NUM]; /* To save a DMC bandwidth-monitor channel counter */
 36 };
 37 
 38 struct dmc_hw_info {
 39         void (*enable)(struct dmc_info *info);
 40         void (*disable)(struct dmc_info *info);
 41         /* Bind an axi line to a bandwidth-monitor channel */
 42         void (*set_axi_filter)(struct dmc_info *info, int axi_id, int chann);
 43         int (*irq_handler)(struct dmc_info *info,
 44                            struct dmc_counter *counter);
 45         void (*get_counters)(struct dmc_info *info,
 46                              struct dmc_counter *counter);
 47 
 48         int dmc_nr;                     /* The number of dmc controller */
 49         int chann_nr;                   /* The number of dmc bandwidth monitor channels */
 50         struct attribute **fmt_attr;
 51         const u64 capability[2];
 52 };
 53 
 54 struct dmc_info {
 55         const struct dmc_hw_info *hw_info;
 56 
 57         void __iomem *ddr_reg[4];
 58         unsigned long timer_value;      /* Timer value in TIMER register */
 59         void __iomem *pll_reg;
 60         int irq_num;                    /* irq vector number */
 61 };
 62 
 63 int meson_ddr_pmu_create(struct platform_device *pdev);
 64 int meson_ddr_pmu_remove(struct platform_device *pdev);
 65 
 66 #endif /* __MESON_DDR_PMU_H__ */
 67 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php