Author: andrew
Date: Wed Apr  4 13:37:59 2018
New Revision: 332026
URL: https://svnweb.freebsd.org/changeset/base/332026

Log:
  Remove fdt_pm_is_enabled as it's Marvell specific. Replace the only call to
  it with a call to the helper function fdt_pm_is_enabled would call.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/arm/mv/mv_common.c
  head/sys/arm/mv/mv_localbus.c
  head/sys/arm/mv/mvvar.h
  head/sys/dev/fdt/fdt_common.c
  head/sys/dev/fdt/fdt_common.h

Modified: head/sys/arm/mv/mv_common.c
==============================================================================
--- head/sys/arm/mv/mv_common.c Wed Apr  4 13:23:06 2018        (r332025)
+++ head/sys/arm/mv/mv_common.c Wed Apr  4 13:37:59 2018        (r332026)
@@ -484,7 +484,7 @@ pm_disable_device(int mask)
 }
 
 int
-fdt_pm(phandle_t node)
+mv_fdt_pm(phandle_t node)
 {
        uint32_t cpu_pm_ctrl;
        int i, ena, compat;

Modified: head/sys/arm/mv/mv_localbus.c
==============================================================================
--- head/sys/arm/mv/mv_localbus.c       Wed Apr  4 13:23:06 2018        
(r332025)
+++ head/sys/arm/mv/mv_localbus.c       Wed Apr  4 13:37:59 2018        
(r332026)
@@ -275,7 +275,7 @@ localbus_attach(device_t dev)
                if (!(ofw_bus_node_status_okay(dt_child)))
                        continue;
 
-               if (!(fdt_pm_is_enabled(dt_child)))
+               if (!(mv_fdt_pm(dt_child)))
                        continue;
 
                di = malloc(sizeof(*di), M_LOCALBUS, M_WAITOK | M_ZERO);

Modified: head/sys/arm/mv/mvvar.h
==============================================================================
--- head/sys/arm/mv/mvvar.h     Wed Apr  4 13:23:06 2018        (r332025)
+++ head/sys/arm/mv/mvvar.h     Wed Apr  4 13:37:59 2018        (r332026)
@@ -141,6 +141,8 @@ int mv_pci_devmap(phandle_t, struct devmap_entry *, vm
 int fdt_localbus_devmap(phandle_t, struct devmap_entry *, int, int *);
 enum soc_family mv_check_soc_family(void);
 
+int mv_fdt_pm(phandle_t);
+
 uint32_t get_tclk_armadaxp(void);
 uint32_t get_tclk_armada38x(void);
 uint32_t get_cpu_freq_armadaxp(void);

Modified: head/sys/dev/fdt/fdt_common.c
==============================================================================
--- head/sys/dev/fdt/fdt_common.c       Wed Apr  4 13:23:06 2018        
(r332025)
+++ head/sys/dev/fdt/fdt_common.c       Wed Apr  4 13:37:59 2018        
(r332026)
@@ -365,19 +365,6 @@ fdt_parent_addr_cells(phandle_t node)
        return ((int)fdt32_to_cpu(addr_cells));
 }
 
-int
-fdt_pm_is_enabled(phandle_t node)
-{
-       int ret;
-
-       ret = 1;
-
-#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY)
-       ret = fdt_pm(node);
-#endif
-       return (ret);
-}
-
 u_long
 fdt_data_get(void *data, int cells)
 {

Modified: head/sys/dev/fdt/fdt_common.h
==============================================================================
--- head/sys/dev/fdt/fdt_common.h       Wed Apr  4 13:23:06 2018        
(r332025)
+++ head/sys/dev/fdt/fdt_common.h       Wed Apr  4 13:37:59 2018        
(r332026)
@@ -91,10 +91,8 @@ int fdt_get_range(phandle_t, int, u_long *, u_long *);
 int fdt_immr_addr(vm_offset_t);
 int fdt_regsize(phandle_t, u_long *, u_long *);
 int fdt_is_compatible_strict(phandle_t, const char *);
-int fdt_pm_is_enabled(phandle_t);
 int fdt_is_type(phandle_t, const char *);
 int fdt_parent_addr_cells(phandle_t);
-int fdt_pm(phandle_t);
 int fdt_get_chosen_bootargs(char *bootargs, size_t max_size);
 
 #endif /* _FDT_COMMON_H_ */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to