Home | History | Annotate | Download | only in pm_service
      1 /*
      2  * Copyright (c) 2013-2015, ARM Limited and Contributors. All rights reserved.
      3  *
      4  * SPDX-License-Identifier: BSD-3-Clause
      5  */
      6 
      7 /*
      8  * Contains definitions of commonly used macros and data types needed
      9  * for PU Power Management. This file should be common for all PU's.
     10  */
     11 
     12 #ifndef _PM_COMMON_H_
     13 #define _PM_COMMON_H_
     14 
     15 #include <debug.h>
     16 #include <stdint.h>
     17 #include "pm_defs.h"
     18 
     19 #define PAYLOAD_ARG_CNT		6U
     20 #define PAYLOAD_ARG_SIZE	4U	/* size in bytes */
     21 
     22 /**
     23  * pm_ipi - struct for capturing IPI-channel specific info
     24  * @mask	mask for enabling/disabling and triggering the IPI
     25  * @base	base address for IPI
     26  * @buffer_base	base address for payload buffer
     27  */
     28 struct pm_ipi {
     29 	const unsigned int mask;
     30 	const uintptr_t base;
     31 	const uintptr_t buffer_base;
     32 };
     33 
     34 /**
     35  * pm_proc - struct for capturing processor related info
     36  * @node_id	node-ID of the processor
     37  * @pwrdn_mask	cpu-specific mask to be used for power control register
     38  * @ipi		pointer to IPI channel structure
     39  *		(in APU all processors share one IPI channel)
     40  */
     41 struct pm_proc {
     42 	const enum pm_node_id node_id;
     43 	const unsigned int pwrdn_mask;
     44 	const struct pm_ipi *ipi;
     45 };
     46 
     47 const struct pm_proc *pm_get_proc(unsigned int cpuid);
     48 const struct pm_proc *pm_get_proc_by_node(enum pm_node_id nid);
     49 
     50 #endif /* _PM_COMMON_H_ */
     51