Commit 4ecca339 authored by Dan Handley's avatar Dan Handley

Move include and source files to logical locations

Move almost all system include files to a logical sub-directory
under ./include. The only remaining system include directories
not under ./include are specific to the platform. Move the
corresponding source files to match the include directory
structure.

Also remove pm.h as it is no longer used.

Change-Id: Ie5ea6368ec5fad459f3e8a802ad129135527f0b3
parent b495bdef
......@@ -132,14 +132,20 @@ endif
.SUFFIXES:
INCLUDES += -Ilib/include/ \
-Idrivers/io \
-Iinclude/${ARCH}/ \
-Iinclude/ \
-Iarch/system/gic \
-Iservices/std_svc/psci \
INCLUDES += -Iinclude/bl1 \
-Iinclude/bl2 \
-Iinclude/bl31 \
-Iinclude/bl31/services \
-Iinclude/bl32 \
-Iinclude/bl32/payloads \
-Iinclude/common \
-Iinclude/drivers \
-Iinclude/drivers/arm \
-Iinclude/lib \
-Iinclude/lib/aarch64 \
-Iinclude/stdlib \
-Iinclude/stdlib/sys \
-Iservices/std_svc/psci \
-Iplat/${PLAT} \
${PLAT_INCLUDES} \
${SPD_INCLUDES}
......
......@@ -32,15 +32,12 @@ vpath %.c plat/${PLAT} \
plat/${PLAT}/${ARCH} \
common \
lib \
arch/${ARCH} \
lib/arch/${ARCH} \
lib/${ARCH} \
${PLAT_BL1_C_VPATH}
vpath %.S arch/${ARCH}/cpu \
plat/common/${ARCH} \
vpath %.S plat/common/${ARCH} \
plat/${PLAT}/${ARCH} \
include \
lib/arch/${ARCH} \
lib/${ARCH} \
${PLAT_BL1_S_VPATH}
BL1_SOURCES += bl1_arch_setup.c \
......
......@@ -32,12 +32,10 @@ vpath %.c common \
lib \
plat/${PLAT} \
plat/${PLAT}/${ARCH} \
arch/${ARCH} \
${PLAT_BL2_C_VPATH}
vpath %.S lib/arch/${ARCH} \
include \
lib/sync/locks/exclusive \
vpath %.S lib/${ARCH} \
lib/locks/exclusive \
common/${ARCH} \
${PLAT_BL2_S_VPATH}
......
......@@ -30,23 +30,21 @@
vpath %.c common \
lib \
arch/system/gic \
drivers/arm/gic \
plat/${PLAT} \
arch/${ARCH} \
services/std_svc \
services/std_svc/psci \
lib/sync/locks/bakery \
lib/locks/bakery \
plat/${PLAT}/${ARCH} \
${PLAT_BL31_C_VPATH}
vpath %.S lib/arch/${ARCH} \
vpath %.S lib/${ARCH} \
services/std_svc \
services/std_svc/psci \
include \
plat/${PLAT}/${ARCH} \
lib/sync/locks/exclusive \
lib/locks/exclusive \
plat/common/${ARCH} \
arch/system/gic/${ARCH} \
drivers/arm/gic/${ARCH} \
common/${ARCH} \
${PLAT_BL31_S_VPATH}
......
......@@ -32,11 +32,9 @@ vpath %.c common \
lib \
plat/${PLAT} \
plat/${PLAT}/${ARCH} \
arch/${ARCH}
vpath %.S lib/arch/${ARCH} \
include \
lib/sync/locks/exclusive \
vpath %.S lib/${ARCH} \
lib/locks/exclusive \
common/${ARCH}
BL32_SOURCES += tsp_entrypoint.S \
......
......@@ -44,7 +44,8 @@ void cci_enable_coherency(unsigned long mpidr)
DVM_EN_BIT | SNOOP_EN_BIT);
/* Wait for the dust to settle down */
while (mmio_read_32(CCI400_BASE + STATUS_REG) & CHANGE_PENDING_BIT);
while (mmio_read_32(CCI400_BASE + STATUS_REG) & CHANGE_PENDING_BIT)
;
}
void cci_disable_coherency(unsigned long mpidr)
......@@ -54,6 +55,7 @@ void cci_disable_coherency(unsigned long mpidr)
~(DVM_EN_BIT | SNOOP_EN_BIT));
/* Wait for the dust to settle down */
while (mmio_read_32(CCI400_BASE + STATUS_REG) & CHANGE_PENDING_BIT);
while (mmio_read_32(CCI400_BASE + STATUS_REG) & CHANGE_PENDING_BIT)
;
}
......@@ -127,19 +127,22 @@ extern void __dead2 raise_el(aapcs64_params *);
extern void __dead2 change_el(el_change_info *);
extern unsigned long make_spsr(unsigned long, unsigned long, unsigned long);
extern void init_bl2_mem_layout(meminfo *,
meminfo *,
unsigned int,
unsigned long) __attribute__((weak));
meminfo *,
unsigned int,
unsigned long) __attribute__((weak));
extern void init_bl31_mem_layout(const meminfo *,
meminfo *,
unsigned int) __attribute__((weak));
meminfo *,
unsigned int) __attribute__((weak));
extern unsigned long image_size(const char *);
extern unsigned long load_image(meminfo *, const char *, unsigned int, unsigned long);
extern unsigned long load_image(meminfo *,
const char *,
unsigned int,
unsigned long);
extern void __dead2 run_image(unsigned long entrypoint,
unsigned long spsr,
unsigned long security_state,
void *first_arg,
void *second_arg);
unsigned long spsr,
unsigned long security_state,
void *first_arg,
void *second_arg);
extern unsigned long *get_el_change_mem_ptr(void);
extern const char build_message[];
......
......@@ -44,10 +44,10 @@ typedef struct {
#define NO_OWNER (-1)
void bakery_lock_init(bakery_lock* bakery);
void bakery_lock_get(unsigned long mpidr, bakery_lock* bakery);
void bakery_lock_release(unsigned long mpidr, bakery_lock* bakery);
int bakery_lock_try(unsigned long mpidr, bakery_lock* bakery);
void bakery_lock_init(bakery_lock *bakery);
void bakery_lock_get(unsigned long mpidr, bakery_lock *bakery);
void bakery_lock_release(unsigned long mpidr, bakery_lock *bakery);
int bakery_lock_try(unsigned long mpidr, bakery_lock *bakery);
#endif /*__ASSEMBLY__*/
#endif /* __BAKERY_LOCK_H__ */
/*
* Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* Neither the name of ARM nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __PM_H__
#define __PM_H__
#ifndef __ASSEMBLY__
/*******************************************************************************
* Structure populated by platform specific code to export routines which
* perform common low level pm functions
******************************************************************************/
typedef struct {
int (*cpu_on)(unsigned long);
int (*cpu_off)(unsigned long);
int (*cpu_suspend)(unsigned long);
int (*affinity_info)(unsigned long, unsigned int);
} pm_frontend_ops;
/*******************************************************************************
* Structure populated by a generic power management api implementation e.g.
* psci to perform api specific bits after a cpu has been turned on.
******************************************************************************/
typedef struct {
unsigned long (*cpu_off_finisher)(unsigned long);
unsigned long (*cpu_suspend_finisher)(unsigned long);
} pm_backend_ops;
/*******************************************************************************
* Function & variable prototypes
******************************************************************************/
extern pm_frontend_ops *get_pm_frontend_ops(void);
extern pm_backend_ops *get_pm_backend_ops(void);
extern void set_pm_frontend_ops(pm_frontend_ops *);
extern void set_pm_backend_ops(pm_backend_ops *);
#endif /*__ASSEMBLY__*/
#endif /* __PM_H__ */
......@@ -59,14 +59,14 @@
#define assert_bakery_entry_valid(entry, bakery) do { \
assert(bakery); \
assert(entry < BAKERY_LOCK_MAX_CPUS); \
} while(0)
} while (0)
/* Convert a ticket to priority */
#define PRIORITY(t, pos) (((t) << 8) | (pos))
/* Initialize Bakery Lock to reset ownership and all ticket values */
void bakery_lock_init(bakery_lock * bakery)
void bakery_lock_init(bakery_lock *bakery)
{
assert(bakery);
......@@ -176,7 +176,7 @@ void bakery_lock_get(unsigned long mpidr, bakery_lock *bakery)
/* Release the lock and signal contenders */
void bakery_lock_release(unsigned long mpidr, bakery_lock * bakery)
void bakery_lock_release(unsigned long mpidr, bakery_lock *bakery)
{
unsigned int me = platform_get_core_pos(mpidr);
......
......@@ -28,34 +28,33 @@
# POSSIBILITY OF SUCH DAMAGE.
#
PLAT_INCLUDES := -Idrivers/arm/interconnect/cci-400 \
-Idrivers/arm/interconnect/tzc-400 \
-Idrivers/console \
-Idrivers/arm/peripherals/pl011 \
-Idrivers/power
#
# No additional platform system include directories required
#
# PLAT_INCLUDES :=
PLAT_BL1_C_VPATH := drivers/arm/interconnect/cci-400 \
drivers/arm/peripherals/pl011 \
lib/arch/${ARCH} \
PLAT_BL1_C_VPATH := drivers/arm/cci400 \
drivers/arm/pl011 \
lib/${ARCH} \
lib/semihosting \
lib/stdlib \
drivers/io
PLAT_BL1_S_VPATH := lib/semihosting/${ARCH}
PLAT_BL2_C_VPATH := drivers/arm/interconnect/cci-400 \
drivers/arm/interconnect/tzc-400 \
drivers/arm/peripherals/pl011 \
lib/arch/${ARCH} \
PLAT_BL2_C_VPATH := drivers/arm/cci400 \
drivers/arm/pl011 \
drivers/arm/tzc400 \
lib/${ARCH} \
lib/stdlib \
lib/semihosting \
drivers/io
PLAT_BL2_S_VPATH := lib/semihosting/${ARCH}
PLAT_BL31_C_VPATH := drivers/arm/interconnect/cci-400 \
drivers/arm/peripherals/pl011 \
lib/arch/${ARCH} \
PLAT_BL31_C_VPATH := drivers/arm/cci-400 \
drivers/arm/pl011 \
lib/${ARCH} \
lib/semihosting \
lib/stdlib \
drivers/power \
......
......@@ -29,7 +29,7 @@
#
TSPD_DIR := services/spd/tspd
SPD_INCLUDES := -Iinclude/spd/tspd \
SPD_INCLUDES := -Iinclude/bl32/payloads \
-I${TSPD_DIR}
SPD_SOURCES := tspd_common.c \
......
../../include/firmware_image_package.h
\ No newline at end of file
../../include/common/firmware_image_package.h
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment