Rename cluster to ccplex

This commit is contained in:
CTCaer 2020-06-14 01:09:17 +03:00
parent fa72d1154d
commit 8e836d958f
7 changed files with 28 additions and 28 deletions

View file

@ -33,7 +33,7 @@
#include "../sec/se_t210.h" #include "../sec/se_t210.h"
#include "../sec/tsec.h" #include "../sec/tsec.h"
#include "../soc/bpmp.h" #include "../soc/bpmp.h"
#include "../soc/cluster.h" #include "../soc/ccplex.h"
#include "../soc/fuse.h" #include "../soc/fuse.h"
#include "../soc/pmc.h" #include "../soc/pmc.h"
#include "../soc/smmu.h" #include "../soc/smmu.h"
@ -989,7 +989,7 @@ int hos_launch(ini_sec_t *cfg)
if (smmu_is_used()) if (smmu_is_used())
smmu_exit(); smmu_exit();
else else
cluster_boot_cpu0(ctxt.pkg1_id->secmon_base); ccplex_boot_cpu0(ctxt.pkg1_id->secmon_base);
while (!secmon_mb->out) while (!secmon_mb->out)
; // A usleep(1) only works when in IRAM or with a trained DRAM. ; // A usleep(1) only works when in IRAM or with a trained DRAM.

View file

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "../soc/cluster.h" #include "../soc/ccplex.h"
#include "../soc/i2c.h" #include "../soc/i2c.h"
#include "../soc/clock.h" #include "../soc/clock.h"
#include "../utils/util.h" #include "../utils/util.h"
@ -23,7 +23,7 @@
#include "../power/max77620.h" #include "../power/max77620.h"
#include "../power/max7762x.h" #include "../power/max7762x.h"
void _cluster_enable_power() void _ccplex_enable_power()
{ {
u8 tmp = i2c_recv_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_AME_GPIO); // Get current pinmuxing u8 tmp = i2c_recv_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_AME_GPIO); // Get current pinmuxing
i2c_send_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_AME_GPIO, tmp & ~(1 << 5)); // Disable GPIO5 pinmuxing. i2c_send_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_AME_GPIO, tmp & ~(1 << 5)); // Disable GPIO5 pinmuxing.
@ -40,7 +40,7 @@ void _cluster_enable_power()
i2c_send_byte(I2C_5, MAX77621_CPU_I2C_ADDR, MAX77621_VOUT_DVC_REG, MAX77621_VOUT_ENABLE | MAX77621_VOUT_0_95V); i2c_send_byte(I2C_5, MAX77621_CPU_I2C_ADDR, MAX77621_VOUT_DVC_REG, MAX77621_VOUT_ENABLE | MAX77621_VOUT_0_95V);
} }
int _cluster_pmc_enable_partition(u32 part, int enable) int _ccplex_pmc_enable_partition(u32 part, int enable)
{ {
u32 part_mask = 1 << part; u32 part_mask = 1 << part;
u32 desired_state = enable << part; u32 desired_state = enable << part;
@ -73,12 +73,12 @@ int _cluster_pmc_enable_partition(u32 part, int enable)
return 1; return 1;
} }
void cluster_boot_cpu0(u32 entry) void ccplex_boot_cpu0(u32 entry)
{ {
// Set ACTIVE_CLUSER to FAST. // Set ACTIVE_CLUSER to FAST.
FLOW_CTLR(FLOW_CTLR_BPMP_CLUSTER_CONTROL) &= 0xFFFFFFFE; FLOW_CTLR(FLOW_CTLR_BPMP_CLUSTER_CONTROL) &= 0xFFFFFFFE;
_cluster_enable_power(); _ccplex_enable_power();
if (!(CLOCK(CLK_RST_CONTROLLER_PLLX_BASE) & 0x40000000)) // PLLX_ENABLE. if (!(CLOCK(CLK_RST_CONTROLLER_PLLX_BASE) & 0x40000000)) // PLLX_ENABLE.
{ {
@ -107,11 +107,11 @@ void cluster_boot_cpu0(u32 entry)
CLOCK(CLK_RST_CONTROLLER_CPU_SOFTRST_CTRL2) &= 0xFFFFF000; CLOCK(CLK_RST_CONTROLLER_CPU_SOFTRST_CTRL2) &= 0xFFFFF000;
// Enable CPU rail. // Enable CPU rail.
_cluster_pmc_enable_partition(0, 1); _ccplex_pmc_enable_partition(0, 1);
// Enable cluster 0 non-CPU. // Enable cluster 0 non-CPU.
_cluster_pmc_enable_partition(15, 1); _ccplex_pmc_enable_partition(15, 1);
// Enable CE0. // Enable CE0.
_cluster_pmc_enable_partition(14, 1); _ccplex_pmc_enable_partition(14, 1);
// Request and wait for RAM repair. // Request and wait for RAM repair.
FLOW_CTLR(FLOW_CTLR_RAM_REPAIR) = 1; FLOW_CTLR(FLOW_CTLR_RAM_REPAIR) = 1;

View file

@ -14,11 +14,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _CLUSTER_H_ #ifndef _CCPLEX_H_
#define _CLUSTER_H_ #define _CCPLEX_H_
#include "../utils/types.h" #include "../utils/types.h"
void cluster_boot_cpu0(u32 entry); void ccplex_boot_cpu0(u32 entry);
#endif #endif

View file

@ -18,7 +18,7 @@
#include <string.h> #include <string.h>
#include "smmu.h" #include "smmu.h"
#include "../soc/cluster.h" #include "../soc/ccplex.h"
#include "../soc/t210.h" #include "../soc/t210.h"
#include "../mem/mc_t210.h" #include "../mem/mc_t210.h"
#include "../utils/util.h" #include "../utils/util.h"
@ -92,7 +92,7 @@ void smmu_enable()
if (smmu_used) if (smmu_used)
return; return;
cluster_boot_cpu0((u32)smmu_payload); ccplex_boot_cpu0((u32)smmu_payload);
smmu_used = true; smmu_used = true;
msleep(150); msleep(150);

View file

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "../soc/cluster.h" #include "../soc/ccplex.h"
#include "../soc/i2c.h" #include "../soc/i2c.h"
#include "../soc/clock.h" #include "../soc/clock.h"
#include "../utils/util.h" #include "../utils/util.h"
@ -23,7 +23,7 @@
#include "../power/max77620.h" #include "../power/max77620.h"
#include "../power/max7762x.h" #include "../power/max7762x.h"
void _cluster_enable_power() void _ccplex_enable_power()
{ {
u8 tmp = i2c_recv_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_AME_GPIO); // Get current pinmuxing u8 tmp = i2c_recv_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_AME_GPIO); // Get current pinmuxing
i2c_send_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_AME_GPIO, tmp & ~(1 << 5)); // Disable GPIO5 pinmuxing. i2c_send_byte(I2C_5, MAX77620_I2C_ADDR, MAX77620_REG_AME_GPIO, tmp & ~(1 << 5)); // Disable GPIO5 pinmuxing.
@ -40,7 +40,7 @@ void _cluster_enable_power()
i2c_send_byte(I2C_5, MAX77621_CPU_I2C_ADDR, MAX77621_VOUT_DVC_REG, MAX77621_VOUT_ENABLE | MAX77621_VOUT_0_95V); i2c_send_byte(I2C_5, MAX77621_CPU_I2C_ADDR, MAX77621_VOUT_DVC_REG, MAX77621_VOUT_ENABLE | MAX77621_VOUT_0_95V);
} }
int _cluster_pmc_enable_partition(u32 part, int enable) int _ccplex_pmc_enable_partition(u32 part, int enable)
{ {
u32 part_mask = 1 << part; u32 part_mask = 1 << part;
u32 desired_state = enable << part; u32 desired_state = enable << part;
@ -73,12 +73,12 @@ int _cluster_pmc_enable_partition(u32 part, int enable)
return 1; return 1;
} }
void cluster_boot_cpu0(u32 entry) void ccplex_boot_cpu0(u32 entry)
{ {
// Set ACTIVE_CLUSER to FAST. // Set ACTIVE_CLUSER to FAST.
FLOW_CTLR(FLOW_CTLR_BPMP_CLUSTER_CONTROL) &= 0xFFFFFFFE; FLOW_CTLR(FLOW_CTLR_BPMP_CLUSTER_CONTROL) &= 0xFFFFFFFE;
_cluster_enable_power(); _ccplex_enable_power();
if (!(CLOCK(CLK_RST_CONTROLLER_PLLX_BASE) & 0x40000000)) // PLLX_ENABLE. if (!(CLOCK(CLK_RST_CONTROLLER_PLLX_BASE) & 0x40000000)) // PLLX_ENABLE.
{ {
@ -107,11 +107,11 @@ void cluster_boot_cpu0(u32 entry)
CLOCK(CLK_RST_CONTROLLER_CPU_SOFTRST_CTRL2) &= 0xFFFFF000; CLOCK(CLK_RST_CONTROLLER_CPU_SOFTRST_CTRL2) &= 0xFFFFF000;
// Enable CPU rail. // Enable CPU rail.
_cluster_pmc_enable_partition(0, 1); _ccplex_pmc_enable_partition(0, 1);
// Enable cluster 0 non-CPU. // Enable cluster 0 non-CPU.
_cluster_pmc_enable_partition(15, 1); _ccplex_pmc_enable_partition(15, 1);
// Enable CE0. // Enable CE0.
_cluster_pmc_enable_partition(14, 1); _ccplex_pmc_enable_partition(14, 1);
// Request and wait for RAM repair. // Request and wait for RAM repair.
FLOW_CTLR(FLOW_CTLR_RAM_REPAIR) = 1; FLOW_CTLR(FLOW_CTLR_RAM_REPAIR) = 1;

View file

@ -14,11 +14,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _CLUSTER_H_ #ifndef _CCPLEX_H_
#define _CLUSTER_H_ #define _CCPLEX_H_
#include "../utils/types.h" #include "../utils/types.h"
void cluster_boot_cpu0(u32 entry); void ccplex_boot_cpu0(u32 entry);
#endif #endif

View file

@ -18,7 +18,7 @@
#include <string.h> #include <string.h>
#include "smmu.h" #include "smmu.h"
#include "../soc/cluster.h" #include "../soc/ccplex.h"
#include "../soc/t210.h" #include "../soc/t210.h"
#include "../mem/mc_t210.h" #include "../mem/mc_t210.h"
#include "../utils/util.h" #include "../utils/util.h"
@ -92,7 +92,7 @@ void smmu_enable()
if (smmu_used) if (smmu_used)
return; return;
cluster_boot_cpu0((u32)smmu_payload); ccplex_boot_cpu0((u32)smmu_payload);
smmu_used = true; smmu_used = true;
msleep(150); msleep(150);