[BACK]Return to sunxi_ccu.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / arm / sunxi

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/arm/sunxi/sunxi_ccu.h between version 1.15 and 1.15.4.5

version 1.15, 2017/10/28 13:13:45 version 1.15.4.5, 2019/01/26 22:00:01
Line 63  enum sunxi_ccu_clktype {
Line 63  enum sunxi_ccu_clktype {
         SUNXI_CCU_DIV,          SUNXI_CCU_DIV,
         SUNXI_CCU_PHASE,          SUNXI_CCU_PHASE,
         SUNXI_CCU_FIXED_FACTOR,          SUNXI_CCU_FIXED_FACTOR,
           SUNXI_CCU_FRACTIONAL,
 };  };
   
 struct sunxi_ccu_gate {  struct sunxi_ccu_gate {
Line 112  struct sunxi_ccu_nkmp {
Line 113  struct sunxi_ccu_nkmp {
 #define SUNXI_CCU_NKMP_SCALE_CLOCK              __BIT(2)  #define SUNXI_CCU_NKMP_SCALE_CLOCK              __BIT(2)
 #define SUNXI_CCU_NKMP_FACTOR_P_POW2            __BIT(3)  #define SUNXI_CCU_NKMP_FACTOR_P_POW2            __BIT(3)
 #define SUNXI_CCU_NKMP_FACTOR_N_ZERO_IS_ONE     __BIT(4)  #define SUNXI_CCU_NKMP_FACTOR_N_ZERO_IS_ONE     __BIT(4)
   #define SUNXI_CCU_NKMP_FACTOR_P_X4              __BIT(5)
 };  };
   
 int     sunxi_ccu_nkmp_enable(struct sunxi_ccu_softc *,  int     sunxi_ccu_nkmp_enable(struct sunxi_ccu_softc *,
Line 246  const char *sunxi_ccu_div_get_parent(str
Line 248  const char *sunxi_ccu_div_get_parent(str
                 .get_parent = sunxi_ccu_div_get_parent,         \                  .get_parent = sunxi_ccu_div_get_parent,         \
         }          }
   
   /* special case of the div model for display clocks */
   int sunxi_ccu_lcdxch0_set_rate(struct sunxi_ccu_softc *,
       struct sunxi_ccu_clk *, struct sunxi_ccu_clk *,
       struct sunxi_ccu_clk *, u_int);
   u_int sunxi_ccu_lcdxch0_round_rate(struct sunxi_ccu_softc *,
       struct sunxi_ccu_clk *, struct sunxi_ccu_clk *,
       struct sunxi_ccu_clk *, u_int);
   
   int sunxi_ccu_lcdxch1_set_rate(struct sunxi_ccu_softc *sc,
       struct sunxi_ccu_clk *clk, struct sunxi_ccu_clk *pclk,
       struct sunxi_ccu_clk *pclk_x2, u_int);
   
 struct sunxi_ccu_prediv {  struct sunxi_ccu_prediv {
         bus_size_t      reg;          bus_size_t      reg;
         const char      **parents;          const char      **parents;
Line 328  struct sunxi_ccu_fixed_factor {
Line 342  struct sunxi_ccu_fixed_factor {
   
 u_int   sunxi_ccu_fixed_factor_get_rate(struct sunxi_ccu_softc *,  u_int   sunxi_ccu_fixed_factor_get_rate(struct sunxi_ccu_softc *,
                                         struct sunxi_ccu_clk *);                                          struct sunxi_ccu_clk *);
   int     sunxi_ccu_fixed_factor_set_rate(struct sunxi_ccu_softc *,
                                           struct sunxi_ccu_clk *, u_int);
 const char *sunxi_ccu_fixed_factor_get_parent(struct sunxi_ccu_softc *,  const char *sunxi_ccu_fixed_factor_get_parent(struct sunxi_ccu_softc *,
                                               struct sunxi_ccu_clk *);                                                struct sunxi_ccu_clk *);
   
Line 340  const char *sunxi_ccu_fixed_factor_get_p
Line 356  const char *sunxi_ccu_fixed_factor_get_p
                 .u.fixed_factor.mult = (_mult),                         \                  .u.fixed_factor.mult = (_mult),                         \
                 .get_rate = sunxi_ccu_fixed_factor_get_rate,            \                  .get_rate = sunxi_ccu_fixed_factor_get_rate,            \
                 .get_parent = sunxi_ccu_fixed_factor_get_parent,        \                  .get_parent = sunxi_ccu_fixed_factor_get_parent,        \
                   .set_rate = sunxi_ccu_fixed_factor_set_rate,            \
           }
   
   struct sunxi_ccu_fractional {
           bus_size_t      reg;
           const char      *parent;
           uint32_t        m;
           uint32_t        m_min;
           uint32_t        m_max;
           uint32_t        div_en;
           uint32_t        frac_sel;
           uint32_t        frac[2];
           uint32_t        prediv;
           uint32_t        prediv_val;
           uint32_t        enable;
           uint32_t        flags;
   #define SUNXI_CCU_FRACTIONAL_PLUSONE    __BIT(0)
   };
   
   int     sunxi_ccu_fractional_enable(struct sunxi_ccu_softc *,
                               struct sunxi_ccu_clk *, int);
   u_int   sunxi_ccu_fractional_get_rate(struct sunxi_ccu_softc *,
                                 struct sunxi_ccu_clk *);
   int     sunxi_ccu_fractional_set_rate(struct sunxi_ccu_softc *,
                                 struct sunxi_ccu_clk *, u_int);
   u_int   sunxi_ccu_fractional_round_rate(struct sunxi_ccu_softc *,
                                 struct sunxi_ccu_clk *, u_int);
   const char *sunxi_ccu_fractional_get_parent(struct sunxi_ccu_softc *,
                                       struct sunxi_ccu_clk *);
   
   #define SUNXI_CCU_FRACTIONAL(_id, _name, _parent, _reg, _m, _m_min, _m_max, \
                        _div_en, _frac_sel, _frac0, _frac1, _prediv, _prediv_val, \
                        _enable, _flags)                                   \
           [_id] = {                                                       \
                   .type = SUNXI_CCU_FRACTIONAL,                           \
                   .base.name = (_name),                                   \
                   .u.fractional.reg = (_reg),                             \
                   .u.fractional.parent = (_parent),                       \
                   .u.fractional.m = (_m),                                 \
                   .u.fractional.m_min = (_m_min),                         \
                   .u.fractional.m_max = (_m_max),                         \
                   .u.fractional.prediv = (_prediv),                       \
                   .u.fractional.prediv_val = (_prediv_val),               \
                   .u.fractional.div_en = (_div_en),                       \
                   .u.fractional.frac_sel = (_frac_sel),                   \
                   .u.fractional.frac[0] = (_frac0),                       \
                   .u.fractional.frac[1] = (_frac1),                       \
                   .u.fractional.enable = (_enable),                       \
                   .enable = sunxi_ccu_fractional_enable,                  \
                   .get_rate = sunxi_ccu_fractional_get_rate,              \
                   .set_rate = sunxi_ccu_fractional_set_rate,              \
                   .round_rate = sunxi_ccu_fractional_round_rate,          \
                   .get_parent = sunxi_ccu_fractional_get_parent,          \
         }          }
   
 struct sunxi_ccu_clk {  struct sunxi_ccu_clk {
Line 353  struct sunxi_ccu_clk {
Line 422  struct sunxi_ccu_clk {
                 struct sunxi_ccu_div div;                  struct sunxi_ccu_div div;
                 struct sunxi_ccu_phase phase;                  struct sunxi_ccu_phase phase;
                 struct sunxi_ccu_fixed_factor fixed_factor;                  struct sunxi_ccu_fixed_factor fixed_factor;
                   struct sunxi_ccu_fractional fractional;
         } u;          } u;
   
         int             (*enable)(struct sunxi_ccu_softc *,          int             (*enable)(struct sunxi_ccu_softc *,
Line 361  struct sunxi_ccu_clk {
Line 431  struct sunxi_ccu_clk {
                                     struct sunxi_ccu_clk *);                                      struct sunxi_ccu_clk *);
         int             (*set_rate)(struct sunxi_ccu_softc *,          int             (*set_rate)(struct sunxi_ccu_softc *,
                                     struct sunxi_ccu_clk *, u_int);                                      struct sunxi_ccu_clk *, u_int);
           u_int           (*round_rate)(struct sunxi_ccu_softc *,
                                       struct sunxi_ccu_clk *, u_int);
         const char *    (*get_parent)(struct sunxi_ccu_softc *,          const char *    (*get_parent)(struct sunxi_ccu_softc *,
                                       struct sunxi_ccu_clk *);                                        struct sunxi_ccu_clk *);
         int             (*set_parent)(struct sunxi_ccu_softc *,          int             (*set_parent)(struct sunxi_ccu_softc *,

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.15.4.5

CVSweb <webmaster@jp.NetBSD.org>