desolve machine_init.c similar to what we did for machine.c

This commit is contained in:
HL Yi committed 2026-10-21 15:20:56 -05:00
1 parent c9e8403c6e
commit 7673ef8322
20 files changed
+128 -109

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
#include "machine_init_defs.h"
void machine_custom_init(void) __banked
{
uint16_t pval;
reg_bit_set(RTL837X_REG_LED_GLB_IO_EN, 6);
reg_bit_set(RTL837X_REG_LED_MODE, 17);
reg_bit_clear(RTL837X_REG_LED_MODE, 9);
reg_bit_clear(RTL837X_REG_LED_MODE, 7);
// OEM firmware sets these companion SDS0 polarity bits for the RTL8221B.
sds_read(0, 0, 0);
pval = SFR_DATA_U16;
sds_write_v(0, 0, 0, pval | 0x100);
sds_read(0, 6, 2);
pval = SFR_DATA_U16;
sds_write_v(0, 6, 2, pval | 0x4000);
}