summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config/gigabeats.h5
-rw-r--r--firmware/export/imx31l.h67
-rw-r--r--firmware/export/system.h6
3 files changed, 33 insertions, 45 deletions
diff --git a/firmware/export/config/gigabeats.h b/firmware/export/config/gigabeats.h
index 6d0c25a4d6..e64ceb0171 100644
--- a/firmware/export/config/gigabeats.h
+++ b/firmware/export/config/gigabeats.h
@@ -147,7 +147,7 @@
147#define GPIO_EVENT_MASK (USE_GPIO1_EVENTS) 147#define GPIO_EVENT_MASK (USE_GPIO1_EVENTS)
148 148
149/* Define this if target has an additional number of threads specific to it */ 149/* Define this if target has an additional number of threads specific to it */
150#define TARGET_EXTRA_THREADS 2 150#define TARGET_EXTRA_THREADS 3
151 151
152/* Type of mobile power - check this out */ 152/* Type of mobile power - check this out */
153#define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */ 153#define BATTERY_CAPACITY_DEFAULT 700 /* default battery capacity */
@@ -168,9 +168,10 @@
168#define FLASH_SIZE 0x200000 168#define FLASH_SIZE 0x200000
169 169
170/* Define this to the CPU frequency */ 170/* Define this to the CPU frequency */
171/* TODO */
172#define CPU_FREQ 264000000 /* Set by retailOS loader */ 171#define CPU_FREQ 264000000 /* Set by retailOS loader */
173 172
173#define FREQ cpu_frequency
174
174/* define this if the unit can be powered or charged via USB */ 175/* define this if the unit can be powered or charged via USB */
175#define HAVE_USB_POWER 176#define HAVE_USB_POWER
176#define USBPOWER_BUTTON BUTTON_MENU 177#define USBPOWER_BUTTON BUTTON_MENU
diff --git a/firmware/export/imx31l.h b/firmware/export/imx31l.h
index 3f94156650..66ae0acc4d 100644
--- a/firmware/export/imx31l.h
+++ b/firmware/export/imx31l.h
@@ -1336,39 +1336,6 @@
1336#define CCM_DCVR_ELV (0x3ff << 2) /* Emergency limit */ 1336#define CCM_DCVR_ELV (0x3ff << 2) /* Emergency limit */
1337#define CCM_DCVR_ELV_POS (2) 1337#define CCM_DCVR_ELV_POS (2)
1338 1338
1339#if 0
1340enum DVFS_W_SIGS
1341{
1342 DVFS_W_SIGS_M3IF_M0_BUF = 0, /* Hready signal of M3IF's master #0
1343 (L2 Cache) */
1344 DVFS_W_SIGS_M3IF_M1 = 1, /* Hready signal of M3IF's master #1
1345 (L2 Cache) */
1346 DVFS_W_SIGS_MBX_MBXCLKGATE = 2, /* Hready signal of M3IF's master #2
1347 (MBX) */
1348 DVFS_W_SIGS_M3IF_M3 = 3, /* Hready signal of M3IF's master #3
1349 (MAX) */
1350 DVFS_W_SIGS_M3IF_M4 = 4, /* Hready signal of M3IF's master #4
1351 (SDMA) */
1352 DVFS_W_SIGS_M3IF_M5 = 5, /* Hready signal of M3IF's master #5
1353 (mpeg4_vga_encoder) */
1354 DVFS_W_SIGS_M3IF_M6 = 6, /* Hready signal of M3IF's master #6
1355 (IPU) */
1356 DVFS_W_SIGS_M3IF_M7 = 7, /* Hready signal of M3IF's master #7
1357 (IPU) */
1358 DVFS_W_SIGS_ARM11_P_IRQ_B_RBT_GATE = 8, /* ARM normal interrupt */
1359 DVFS_W_SIGS_ARM11_P_FIQ_B_RBT_GATE = 9, /* ARM fast interrupt */
1360 DVFS_W_SIGS_IPI_GPIO1_INT0 = 10, /* Interrupt line from GPIO */
1361 DVFS_W_SIGS_IPI_INT_IPU_FUNC = 11, /* Interrupt line from IPU */
1362 DVFS_W_SIGS_DVGP0 = 12, /* Software-controllable general-purpose
1363 bits from the CCM */
1364 DVFS_W_SIGS_DVGP1 = 13, /* Software-controllable general-purpose
1365 bits from the CCM */
1366 DVFS_W_SIGS_DVGP2 = 14, /* Software-controllable general-purpose
1367 bits from the CCM */
1368 DVFS_W_SIGS_DVGP3 = 15, /* Software-controllable general-purpose
1369 bits from the CCM */
1370};
1371#endif
1372 1339
1373/* LTR0 */ 1340/* LTR0 */
1374#define CCM_LTR0_UPTHR (0x3f << 22) 1341#define CCM_LTR0_UPTHR (0x3f << 22)
@@ -1383,15 +1350,26 @@ enum DVFS_W_SIGS
1383#define CCM_LTR0_DIV3CK_32768 (0x2 << 1) /* 1/32768 ARM clock */ 1350#define CCM_LTR0_DIV3CK_32768 (0x2 << 1) /* 1/32768 ARM clock */
1384#define CCM_LTR0_DIV3CK_131072 (0x3 << 1) /* 1/131072 ARM clock */ 1351#define CCM_LTR0_DIV3CK_131072 (0x3 << 1) /* 1/131072 ARM clock */
1385 1352
1353/* LTR1 */
1354#define CCM_LTR1_LTBRSH (1 << 23)
1355#define CCM_LTR1_LTBRSR (1 << 22)
1356#define CCM_LTR1_DNCNT (0xff << 14)
1357#define CCM_LTR1_DNCNT_POS (14)
1358#define CCM_LTR1_UPCNT (0xff << 6)
1359#define CCM_LTR1_UPCNT_POS (6)
1360#define CCM_LTR1_PNCTHR (0x3f << 0)
1361#define CCM_LTR1_PNCTHR_POS (0)
1362
1363/* LTR2 */
1364#define CCM_LTR2_EMAC (0x1ff)
1365#define CCM_LTR2_EMAC_POS (0)
1366
1386/* PMCR0 */ 1367/* PMCR0 */
1387#define CCM_PMCR0_DVSUP_MCUPLL (1 << 31) 1368#define CCM_PMCR0_DFSUP_MCUPLL (1 << 31)
1388#define CCM_PMCR0_DVSUP_POST_DIVIDERS (1 << 30) 1369#define CCM_PMCR0_DFSUP_MCUPLL_POS (31)
1389#define CCM_PMCR0_DVSUP_DVS (0x3 << 28) 1370#define CCM_PMCR0_DFSUP_POST_DIVIDERS (1 << 30)
1390#define CCM_PMCR0_DVS1_0_DVS0_0 (0x0 << 28) /* Highest frequency/voltage */ 1371#define CCM_PMCR0_DVSUP (0x3 << 28)
1391#define CCM_PMCR0_DVS1_0_DVS0_1 (0x1 << 28) /* ... */ 1372#define CCM_PMCR0_DVSUP_POS (28)
1392#define CCM_PMCR0_DVS1_1_DVS0_0 (0x2 << 28) /* ... */
1393#define CCM_PMCR0_DVS1_1_DVS0_1 (0x3 << 28) /* Lowest frequency/voltage */
1394#define CCM_PMCR0_DVS_POS (28)
1395#define CCM_PMCR0_UDSC (1 << 27) 1373#define CCM_PMCR0_UDSC (1 << 27)
1396#define CCM_PMCR0_VSCNT (0x7 << 24) 1374#define CCM_PMCR0_VSCNT (0x7 << 24)
1397#define CCM_PMCR0_VSCNT_POS (24) 1375#define CCM_PMCR0_VSCNT_POS (24)
@@ -1431,6 +1409,13 @@ enum DVFS_W_SIGS
1431#define CCM_PMCR0_DPTEN (1 << 0) 1409#define CCM_PMCR0_DPTEN (1 << 0)
1432 1410
1433 1411
1412/* PMCR1 */
1413#define CCM_PMCR1_DVGP_POS (0)
1414#define CCM_PMCR1_DVGP_MASK (0xf << 0)
1415
1416/* IC revision 2.0 or greater ONLY! */
1417#define CCM_PMCR1_EMIRQ_EN (1 << 8)
1418#define CCM_PMCR1_PLLRDIS (1 << 7) /* No PLL reset on switch */
1434 1419
1435 1420
1436/* WEIM - CS0 */ 1421/* WEIM - CS0 */
diff --git a/firmware/export/system.h b/firmware/export/system.h
index 9df382bc24..3984ebeb11 100644
--- a/firmware/export/system.h
+++ b/firmware/export/system.h
@@ -66,15 +66,17 @@ void cpu_boost(bool on_off);
66#endif 66#endif
67void cpu_idle_mode(bool on_off); 67void cpu_idle_mode(bool on_off);
68int get_cpu_boost_counter(void); 68int get_cpu_boost_counter(void);
69#else 69#else /* ndef HAVE_ADJUSTABLE_CPU_FREQ */
70#ifndef FREQ
70#define FREQ CPU_FREQ 71#define FREQ CPU_FREQ
72#endif
71#define set_cpu_frequency(frequency) 73#define set_cpu_frequency(frequency)
72#define cpu_boost(on_off) 74#define cpu_boost(on_off)
73#define cpu_boost_id(on_off, id) 75#define cpu_boost_id(on_off, id)
74#define cpu_idle_mode(on_off) 76#define cpu_idle_mode(on_off)
75#define get_cpu_boost_counter() 77#define get_cpu_boost_counter()
76#define get_cpu_boost_tracker() 78#define get_cpu_boost_tracker()
77#endif 79#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
78 80
79#ifdef CPU_BOOST_LOGGING 81#ifdef CPU_BOOST_LOGGING
80#define cpu_boost(on_off) cpu_boost_(on_off,__FILE__, __LINE__) 82#define cpu_boost(on_off) cpu_boost_(on_off,__FILE__, __LINE__)