2 * Keystone EVM : Board initialization
5 * Texas Instruments Incorporated, <www.ti.com>
7 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/arch/psc_defs.h>
13 #include <asm/arch/hardware.h>
16 * cpu_to_bus - swap bytes of the 32-bit data if the device is BE
17 * @ptr - array of data
18 * @length - lenght of data array
20 int cpu_to_bus(u32 *ptr, u32 length)
24 if (!(readl(KS2_DEVSTAT) & 0x1))
25 for (i = 0; i < length; i++, ptr++)
26 *ptr = cpu_to_be32(*ptr);
31 static void turn_off_all_dsps(int num_dsps)
35 for (i = 0; i < num_dsps; i++) {
36 if (psc_disable_module(i + KS2_LPSC_GEM_0))
37 printf("Cannot disable module for #%d DSP", i);
39 if (psc_disable_domain(i + KS2_GEM_0_PWR_DOMAIN))
40 printf("Cannot disable domain for #%d DSP", i);
49 env = env_get("ks2_debug");
52 ks2_debug = simple_strtol(env, NULL, 0);
54 if ((ks2_debug & DBG_LEAVE_DSPS_ON) == 0)
55 turn_off_all_dsps(KS2_NUM_DSPS);