Skip to content

Commit

Permalink
Merge pull request #82 from YuzukiHD/dev
Browse files Browse the repository at this point in the history
add abort on each except, fix aarch32 mdelay issue, add putc func, bss move to a1 ram
  • Loading branch information
YuzukiTsuru authored May 4, 2024
2 parents a61d2e6 + e9b9920 commit f57376b
Show file tree
Hide file tree
Showing 11 changed files with 585 additions and 38 deletions.
34 changes: 2 additions & 32 deletions board/avaota-a1/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ sunxi_i2c_t i2c_pmu = {
};

const uint32_t dram_para[32] = {
924,
1200,
0x8,
0x7070707,
0xd0d0d0d,
Expand Down Expand Up @@ -139,39 +139,9 @@ const uint32_t dram_para[32] = {
0x48484848,
};

const char *dram_para_name[32] = {
const char *dram_para_name[2] = {
"dram_para00",
"dram_para01",
"dram_para02",
"dram_para03",
"dram_para04",
"dram_para05",
"dram_para06",
"dram_para07",
"dram_para08",
"dram_para09",
"dram_para10",
"dram_para11",
"dram_para12",
"dram_para13",
"dram_para14",
"dram_para15",
"dram_para16",
"dram_para17",
"dram_para18",
"dram_para19",
"dram_para20",
"dram_para21",
"dram_para22",
"dram_para23",
"dram_para24",
"dram_para25",
"dram_para26",
"dram_para27",
"dram_para28",
"dram_para29",
"dram_para30",
"dram_para31",
};

void neon_enable(void) {
Expand Down
2 changes: 1 addition & 1 deletion board/avaota-a1/extlinux_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ static int load_extlinux(image_info_t *image, uint64_t dram_size) {
int dram_node = fdt_find_or_add_subnode(image->of_dest, 0, "dram");
/* Kernel only need 0: DRAM_CLK, 24: DRAM_DIV */
fdt_setprop_u32(image->of_dest, dram_node, dram_para_name[0], dram_para[0]);
fdt_setprop_u32(image->of_dest, dram_node, dram_para_name[24], dram_para[24]);
fdt_setprop_u32(image->of_dest, dram_node, dram_para_name[1], dram_para[24]);

/* Append bootargs mac address */
uint32_t chip_sid[4];
Expand Down
9 changes: 8 additions & 1 deletion board/avaota-a1/init_dram/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ extern sunxi_i2c_t i2c_pmu;
extern void set_rpio_power_mode(void);
extern void rtc_set_vccio_det_spare(void);

#include "memtester.c"


int main(void) {
sunxi_serial_init(&uart_dbg);

Expand Down Expand Up @@ -50,10 +53,14 @@ int main(void) {

enable_sram_a3();

printk_info("DRAM: DRAM Size = %dMB\n", sunxi_dram_init(NULL));
uint64_t dram_size = sunxi_dram_init(NULL);

printk_info("DRAM: DRAM Size = %dMB\n", dram_size);

sunxi_clk_dump();

do_memtester(SDRAM_BASE, dram_size * 1024 * 1024);

int i = 0;

while (1) {
Expand Down
Loading

0 comments on commit f57376b

Please sign in to comment.