]> Git Repo - linux.git/commitdiff
Merge tag 'omap-for-v4.16/soc-signed' of ssh://gitolite.kernel.org/pub/scm/linux...
authorArnd Bergmann <[email protected]>
Thu, 21 Dec 2017 16:17:40 +0000 (17:17 +0100)
committerArnd Bergmann <[email protected]>
Thu, 21 Dec 2017 16:17:40 +0000 (17:17 +0100)
Pull "SoC changes for omaps for v4.16 merge window" from Tony Lindgren:

For most part this is a series from Tero Kristo to prepare things
for using clkctrl clocks with DTS data. The other changes are to
make few data structures const.

* tag 'omap-for-v4.16/soc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: CM: make cm_ll_data structures as const
  ARM: OMAP2+: CM: make some pointers and function arguments as const
  ARM: DM816x: hwmod_data: fix clockdomain name for sata hwmod
  ARM: OMAP2+: hwmod: calculate physical register address on am33xx
  ARM: AM33xx: CM: add support for getting physical address for a register
  ARM: OMAP2+: clockdomain: remove the obsolete clkdm_xlate_address API
  ARM: OMAP2+: hwmod: fix clkctrl address translation logic
  ARM: OMAP4: CMINST: add support for translating clkctrl addresses
  ARM: OMAP2+: CM: add support for getting phys address for a clkctrl register

1  2 
arch/arm/mach-omap2/cm_common.c

index 83c6fa74cc31e41616f06495bc5b210decd6ac6e,7e9c85e37454e51c902ee15faab236ed62746b02..aff747ecad51f02bb4ca158c157454e341ad046e
@@@ -29,7 -29,7 +29,7 @@@
   * common CM functions
   */
  static struct cm_ll_data null_cm_ll_data;
- static struct cm_ll_data *cm_ll_data = &null_cm_ll_data;
+ static const struct cm_ll_data *cm_ll_data = &null_cm_ll_data;
  
  /* cm_base: base virtual address of the CM IP block */
  struct omap_domain_base cm_base;
@@@ -68,17 -68,14 +68,17 @@@ void __init omap2_set_globals_cm(void _
  int cm_split_idlest_reg(struct clk_omap_reg *idlest_reg, s16 *prcm_inst,
                        u8 *idlest_reg_id)
  {
 +      int ret;
        if (!cm_ll_data->split_idlest_reg) {
                WARN_ONCE(1, "cm: %s: no low-level function defined\n",
                          __func__);
                return -EINVAL;
        }
  
 -      return cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst,
 +      ret = cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst,
                                           idlest_reg_id);
 +      *prcm_inst -= cm_base.offset;
 +      return ret;
  }
  
  /**
@@@ -178,6 -175,16 +178,16 @@@ int omap_cm_module_disable(u8 part, u1
        return 0;
  }
  
+ u32 omap_cm_xlate_clkctrl(u8 part, u16 inst, u16 clkctrl_offs)
+ {
+       if (!cm_ll_data->xlate_clkctrl) {
+               WARN_ONCE(1, "cm: %s: no low-level function defined\n",
+                         __func__);
+               return 0;
+       }
+       return cm_ll_data->xlate_clkctrl(part, inst, clkctrl_offs);
+ }
  /**
   * cm_register - register per-SoC low-level data with the CM
   * @cld: low-level per-SoC OMAP CM data & function pointers to register
   * is NULL, or -EEXIST if cm_register() has already been called
   * without an intervening cm_unregister().
   */
- int cm_register(struct cm_ll_data *cld)
+ int cm_register(const struct cm_ll_data *cld)
  {
        if (!cld)
                return -EINVAL;
   * -EINVAL if @cld is NULL or if @cld does not match the struct
   * cm_ll_data * previously registered by cm_register().
   */
- int cm_unregister(struct cm_ll_data *cld)
+ int cm_unregister(const struct cm_ll_data *cld)
  {
        if (!cld || cm_ll_data != cld)
                return -EINVAL;
@@@ -340,7 -347,6 +350,7 @@@ int __init omap2_cm_base_init(void
                if (mem) {
                        mem->pa = res.start + data->offset;
                        mem->va = data->mem + data->offset;
 +                      mem->offset = data->offset;
                }
  
                data->np = np;
This page took 0.0594 seconds and 4 git commands to generate.