*/
 static inline void l2c_set_debug(void __iomem *base, unsigned long val)
 {
-       if (outer_cache.set_debug)
-               outer_cache.set_debug(val);
-       else
-               l2c_write_sec(val, base, L2X0_DEBUG_CTRL);
+       l2c_write_sec(val, base, L2X0_DEBUG_CTRL);
 }
 
 static void __l2c_op_way(void __iomem *reg)
 #if defined(CONFIG_PL310_ERRATA_588369) || defined(CONFIG_PL310_ERRATA_727915)
 static inline void debug_writel(unsigned long val)
 {
-       if (outer_cache.set_debug || outer_cache.write_sec)
-               l2c_set_debug(l2x0_base, val);
+       l2c_set_debug(l2x0_base, val);
 }
 #else
 /* Optimised out for non-errata case */
  *     Affects: store buffer
  *     store buffer is not automatically drained.
  */
-static void l2c310_set_debug(unsigned long val)
-{
-       writel_relaxed(val, l2x0_base + L2X0_DEBUG_CTRL);
-}
-
 static void l2c310_inv_range_erratum(unsigned long start, unsigned long end)
 {
        void __iomem *base = l2x0_base;
        const char *errata[8];
        unsigned n = 0;
 
-       /* For compatibility */
-       if (revision <= L310_CACHE_ID_RTL_R3P0)
-               fns->set_debug = l2c310_set_debug;
-
        if (IS_ENABLED(CONFIG_PL310_ERRATA_588369) &&
            revision < L310_CACHE_ID_RTL_R2P0 &&
            /* For bcm compatibility */
                .flush_all = l2c210_flush_all,
                .disable = l2c_disable,
                .sync = l2c210_sync,
-               .set_debug = l2c310_set_debug,
                .resume = l2c310_resume,
        },
 };
        fns.write_sec = outer_cache.write_sec;
        if (data->fixup)
                data->fixup(l2x0_base, cache_id, &fns);
-       if (fns.write_sec)
-               fns.set_debug = NULL;
 
        /*
         * Check if l2x0 controller is already enabled.  If we are booting
                .flush_all   = l2c210_flush_all,
                .disable     = l2c_disable,
                .sync        = l2c210_sync,
-               .set_debug   = l2c310_set_debug,
                .resume      = l2c310_resume,
        },
 };