Skip to content

Commit

Permalink
[driver] dram size in mb
Browse files Browse the repository at this point in the history
  • Loading branch information
SamulKyull authored and SamulKyull committed Nov 10, 2024
1 parent 5762bbd commit d9bc602
Show file tree
Hide file tree
Showing 42 changed files with 53 additions and 53 deletions.
4 changes: 2 additions & 2 deletions board/100ask-d1-h/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static const char *find_entry_value(const IniEntry *entries, int entry_count, co
return NULL;
}

static int update_bootargs_from_config(uint64_t dram_size) {
static int update_bootargs_from_config(uint32_t dram_size) {
int ret = 0;
char *bootargs_str_config = NULL;
char *mac_addr = NULL;
Expand Down Expand Up @@ -557,7 +557,7 @@ int main(void) {
sunxi_clk_init();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

/* Debug message to indicate that MMU is enabled. */
printk_debug("enable mmu ok\n");
Expand Down
4 changes: 2 additions & 2 deletions board/100ask-ros/extlinux_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static char *get_mac_address_from_sid(uint32_t chip_sid[4], char mac_address_str
return mac_address_str;
}

static int load_extlinux(image_info_t *image, uint64_t dram_size) {
static int load_extlinux(image_info_t *image, uint32_t dram_size) {
FATFS fs;
FRESULT fret;
ext_linux_data_t data = {0};
Expand Down Expand Up @@ -612,7 +612,7 @@ int main(void) {
pmu_axp2202_dump(&i2c_pmu);

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

arm32_mmu_enable(SDRAM_BASE, dram_size);

Expand Down
2 changes: 1 addition & 1 deletion board/100ask-ros/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ int main(void) {
pmu_axp2202_dump(&i2c_pmu);

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

arm32_mmu_enable(SDRAM_BASE, dram_size);

Expand Down
4 changes: 2 additions & 2 deletions board/100ask-t113i/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static const char *find_entry_value(const IniEntry *entries, int entry_count, co
return NULL;
}

static int update_bootargs_from_config(uint64_t dram_size) {
static int update_bootargs_from_config(uint32_t dram_size) {
int ret = 0;
char *bootargs_str_config = NULL;
char *mac_addr = NULL;
Expand Down Expand Up @@ -570,7 +570,7 @@ int main(void) {
}

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
2 changes: 1 addition & 1 deletion board/100ask-t113s3/syter_boot_rtt/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int main(void) {
sunxi_clk_init();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Initialize the small memory allocator. */
Expand Down
2 changes: 1 addition & 1 deletion board/100ask-t113s3/usb_test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main(void) {
printk_info("Hello World!\n");

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
4 changes: 2 additions & 2 deletions board/avaota-a1/extlinux_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static char *get_mac_address_from_sid(uint32_t chip_sid[4], char mac_address_str
return mac_address_str;
}

static int load_extlinux(image_info_t *image, uint64_t dram_size) {
static int load_extlinux(image_info_t *image, uint32_t dram_size) {
FATFS fs;
FRESULT fret;
ext_linux_data_t data = {0};
Expand Down Expand Up @@ -717,7 +717,7 @@ int main(void) {
enable_sram_a3();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init((void *) dram_para);
uint32_t dram_size = sunxi_dram_init((void *) dram_para);

printk_debug("DRAM Size = %dM\n", dram_size);

Expand Down
2 changes: 1 addition & 1 deletion board/avaota-a1/init_dram/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int main(void) {

enable_sram_a3();

uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);
printk_info("DRAM: DRAM Size = %dMB", dram_size);

Expand Down
2 changes: 1 addition & 1 deletion board/avaota-a1/init_dram/memtester.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ static struct test tests[] = {
{NULL, NULL}};

/* Function declarations */
static int do_memtester(uint64_t start_addr, uint64_t dram_size, uint64_t test_size, uint32_t loops) {
static int do_memtester(uint64_t start_addr, uint32_t dram_size, uint64_t test_size, uint32_t loops) {
ul loop, i;
uint64_t bufsize, wantbytes, wantmb, halflen, count;
char *memsuffix;
Expand Down
2 changes: 1 addition & 1 deletion board/avaota-a1/load_e906/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ int main(void) {
enable_sram_a3();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

sunxi_clk_dump();

Expand Down
2 changes: 1 addition & 1 deletion board/avaota-a1/smhc_test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ int main(void) {
enable_sram_a3();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

printk_debug("DRAM Size = %dM\n", dram_size);

Expand Down
2 changes: 1 addition & 1 deletion board/avaota-a1/spi_lcd/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ int main(void) {
enable_sram_a3();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

sunxi_clk_dump();

Expand Down
2 changes: 1 addition & 1 deletion board/avaota-a1/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ int main(void) {
enable_sram_a3();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

sunxi_clk_dump();

Expand Down
2 changes: 1 addition & 1 deletion board/avaota-a1/syter_boot_bl33/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ int main(void) {
enable_sram_a3();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

sunxi_clk_dump();

Expand Down
2 changes: 1 addition & 1 deletion board/avaota-a1/syter_boot_uboot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ int main(void) {
enable_sram_a3();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

sunxi_clk_dump();

Expand Down
2 changes: 1 addition & 1 deletion board/avaota-cam/hello_world/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int main(void) {

sunxi_clk_dump();

uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

sunxi_spi_init(&sunxi_spi0);

Expand Down
4 changes: 2 additions & 2 deletions board/dongshanpi-aict/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static const char *find_entry_value(const IniEntry *entries, int entry_count, co
return NULL;
}

static int update_bootargs_from_config(uint64_t dram_size) {
static int update_bootargs_from_config(uint32_t dram_size) {
int ret = 0;
char *bootargs_str_config = NULL;
char *mac_addr = NULL;
Expand Down Expand Up @@ -570,7 +570,7 @@ int main(void) {
}

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
2 changes: 1 addition & 1 deletion board/dongshanpi-aict/syter_boot_spi/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ int main(void) {
}

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
2 changes: 1 addition & 1 deletion board/longanpi-3h/load_bl31/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int main(void) {
set_pmu_fin_voltage("dcdc3", 1100);

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

arm32_mmu_enable(SDRAM_BASE, dram_size);

Expand Down
2 changes: 1 addition & 1 deletion board/longanpi-3h/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ int main(void) {
set_pmu_fin_voltage("dcdc3", 1100);

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Initialize the small memory allocator. */
Expand Down
2 changes: 1 addition & 1 deletion board/longanpi-3h/tinymaix/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ int main(void) {
pmu_axp1530_dump(&i2c_pmu);

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);

arm32_mmu_enable(SDRAM_BASE, dram_size);

Expand Down
4 changes: 2 additions & 2 deletions board/longanpi-4b/extlinux_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ static char *get_mac_address_from_sid(uint32_t chip_sid[4], char mac_address_str
return mac_address_str;
}

static int load_extlinux(image_info_t *image, uint64_t dram_size) {
static int load_extlinux(image_info_t *image, uint32_t dram_size) {
FATFS fs;
FRESULT fret;
ext_linux_data_t data = {0};
Expand Down Expand Up @@ -679,7 +679,7 @@ int main(void) {
enable_sram_a3();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(NULL);
uint32_t dram_size = sunxi_dram_init(NULL);

sunxi_clk_dump();

Expand Down
4 changes: 2 additions & 2 deletions board/project-yosemite/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static const char *find_entry_value(const IniEntry *entries, int entry_count, co
return NULL;
}

static int update_bootargs_from_config(uint64_t dram_size) {
static int update_bootargs_from_config(uint32_t dram_size) {
int ret = 0;
char *bootargs_str_config = NULL;
char *mac_addr = NULL;
Expand Down Expand Up @@ -570,7 +570,7 @@ int main(void) {
}

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
2 changes: 1 addition & 1 deletion board/project-yosemite/syter_boot_spi/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ int main(void) {
}

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
2 changes: 1 addition & 1 deletion board/tinyvision/spi_lcd/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ int main(void) {

sunxi_clk_init();

uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

printk_debug("enable mmu ok\n");
Expand Down
4 changes: 2 additions & 2 deletions board/tinyvision/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static const char *find_entry_value(const IniEntry *entries, int entry_count, co
return NULL;
}

static int update_bootargs_from_config(uint64_t dram_size) {
static int update_bootargs_from_config(uint32_t dram_size) {
int ret = 0;
char *bootargs_str_config = NULL;
char *mac_addr = NULL;
Expand Down Expand Up @@ -570,7 +570,7 @@ int main(void) {
}

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
4 changes: 2 additions & 2 deletions board/tinyvision/syter_boot_sdnand/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static const char *find_entry_value(const IniEntry *entries, int entry_count, co
return NULL;
}

static int update_bootargs_from_config(uint64_t dram_size) {
static int update_bootargs_from_config(uint32_t dram_size) {
int ret = 0;
char *bootargs_str_config = NULL;
char *mac_addr = NULL;
Expand Down Expand Up @@ -570,7 +570,7 @@ int main(void) {
}

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
2 changes: 1 addition & 1 deletion board/tinyvision/usb_test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main(void) {
printk_info("Hello World!\n");

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
4 changes: 2 additions & 2 deletions board/yuzukihomekit/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ static char *skip_spaces(char *str) {
return str;
}

static int update_dtb_for_linux(uint64_t dram_size) {
static int update_dtb_for_linux(uint32_t dram_size) {
int ret = 0;

/* Force image.of_dest to be a pointer to fdt_header structure */
Expand Down Expand Up @@ -362,7 +362,7 @@ int main(void) {
sunxi_clk_init();

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Initialize the small memory allocator. */
Expand Down
2 changes: 1 addition & 1 deletion board/yuzukihomekit/usb_test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main(void) {
printk_info("Hello World!\n");

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
4 changes: 2 additions & 2 deletions board/yuzukilizard/syter_boot/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static const char *find_entry_value(const IniEntry *entries, int entry_count, co
return NULL;
}

static int update_bootargs_from_config(uint64_t dram_size) {
static int update_bootargs_from_config(uint32_t dram_size) {
int ret = 0;
char *bootargs_str_config = NULL;
char *mac_addr = NULL;
Expand Down Expand Up @@ -570,7 +570,7 @@ int main(void) {
}

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
2 changes: 1 addition & 1 deletion board/yuzukilizard/syter_boot_spi/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ int main(void) {
}

/* Initialize the DRAM and enable memory management unit (MMU). */
uint64_t dram_size = sunxi_dram_init(&dram_para);
uint32_t dram_size = sunxi_dram_init(&dram_para);
arm32_mmu_enable(SDRAM_BASE, dram_size);

/* Debug message to indicate that MMU is enabled. */
Expand Down
2 changes: 1 addition & 1 deletion include/arch/arm32/mmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static inline void arm32_interrupt_disable(void) {
: "memory");
}

static inline void arm32_mmu_enable(const uint32_t dram_base, uint64_t dram_size) {
static inline void arm32_mmu_enable(const uint32_t dram_base, uint32_t dram_size) {
uint32_t mmu_base;

/* use dram high 16M */
Expand Down
Loading

0 comments on commit d9bc602

Please sign in to comment.