Skip to content

Commit 41aac76

Browse files
committed
Bring T6020 support up to parity with T6021
Missing smp/cpufreq/soc stuff. Signed-off-by: Hector Martin <[email protected]>
1 parent 06884b5 commit 41aac76

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

src/cpufreq.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ static const struct cluster_t t6000_clusters[] = {
7070
{},
7171
};
7272

73-
static const struct cluster_t t6021_clusters[] = {
74-
{"ECPU0", 0x210e20000, false, 5},
75-
{"PCPU0", 0x211e20000, false, 6},
76-
{"PCPU1", 0x212e20000, false, 6},
77-
{},
78-
};
79-
8073
static const struct cluster_t t6002_clusters[] = {
8174
{"ECPU0", 0x0210e20000, false, 5},
8275
{"PCPU0", 0x0211e20000, false, 7},
@@ -93,6 +86,13 @@ static const struct cluster_t t8112_clusters[] = {
9386
{},
9487
};
9588

89+
static const struct cluster_t t6020_clusters[] = {
90+
{"ECPU0", 0x210e20000, false, 5},
91+
{"PCPU0", 0x211e20000, false, 6},
92+
{"PCPU1", 0x212e20000, false, 6},
93+
{},
94+
};
95+
9696
int cpufreq_init(void)
9797
{
9898
printf("cpufreq: Initializing clusters\n");
@@ -110,8 +110,9 @@ int cpufreq_init(void)
110110
case T6002:
111111
cluster = t6002_clusters;
112112
break;
113+
case T6020:
113114
case T6021:
114-
cluster = t6021_clusters;
115+
cluster = t6020_clusters;
115116
break;
116117
case T8112:
117118
cluster = t8112_clusters;

src/smp.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#define CPU_START_OFF_T8103 0x54000
1414
#define CPU_START_OFF_T8112 0x34000
15-
#define CPU_START_OFF_T6021 0x28000
15+
#define CPU_START_OFF_T6020 0x28000
1616

1717
#define CPU_REG_CORE GENMASK(7, 0)
1818
#define CPU_REG_CLUSTER GENMASK(10, 8)
@@ -162,8 +162,9 @@ void smp_start_secondaries(void)
162162
case T8112:
163163
cpu_start_off = CPU_START_OFF_T8112;
164164
break;
165+
case T6020:
165166
case T6021:
166-
cpu_start_off = CPU_START_OFF_T6021;
167+
cpu_start_off = CPU_START_OFF_T6020;
167168
break;
168169
default:
169170
printf("CPU start offset is unknown for this SoC!\n");

src/soc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
#define T6000 0x6000
1111
#define T6001 0x6001
1212
#define T6002 0x6002
13+
#define T6020 0x6020
1314
#define T6021 0x6021
1415

1516
#ifdef TARGET
1617

1718
#if TARGET == T8103
1819
#define EARLY_UART_BASE 0x235200000
19-
#elif TARGET == T6000 || TARGET == T6001 || TARGET == T6002 || TARGET == T6021
20+
#elif TARGET == T6000 || TARGET == T6001 || TARGET == T6002 || TARGET == T6020 || TARGET == T6021
2021
#define EARLY_UART_BASE 0x39b200000
2122
#elif TARGET == T8112
2223
#define EARLY_UART_BASE 0x235200000

0 commit comments

Comments
 (0)