mirror of
https://github.com/pine64/blisp.git
synced 2026-09-18 16:31:30 +00:00
Integrated eflash_loader
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include "../../data/bl60x_eflash_loader.h"
|
||||
#include "blisp.h"
|
||||
|
||||
int64_t blisp_chip_bl60x_get_eflash_loader(uint8_t clk_type, uint8_t** firmware_buf_ptr)
|
||||
{
|
||||
uint8_t* firmware_buf = malloc(sizeof(bl60x_eflash_loader_bin));
|
||||
memcpy(firmware_buf, bl60x_eflash_loader_bin, sizeof(bl60x_eflash_loader_bin));
|
||||
*(firmware_buf + 0xE0) = 4; // TODO: 40 MHz clock
|
||||
*firmware_buf_ptr = firmware_buf;
|
||||
return sizeof(bl60x_eflash_loader_bin);
|
||||
}
|
||||
|
||||
struct blisp_chip blisp_chip_bl60x = {
|
||||
.type = BLISP_CHIP_BL60X,
|
||||
.type_str = "bl60x",
|
||||
.usb_isp_available = false,
|
||||
.default_xtal = "40m",
|
||||
.handshake_byte_multiplier = 0.006f,
|
||||
.needs_eflash_loader = true
|
||||
.load_eflash_loader = blisp_chip_bl60x_get_eflash_loader,
|
||||
.tcm_address = 0x22010000
|
||||
};
|
||||
|
||||
@@ -7,5 +7,5 @@ struct blisp_chip blisp_chip_bl61x = {
|
||||
.usb_isp_available = true,
|
||||
.default_xtal = "-", // ?
|
||||
.handshake_byte_multiplier = 0.003f,
|
||||
.needs_eflash_loader = false
|
||||
.get_eflash_loader = NULL
|
||||
};
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include "../../data/bl70x_eflash_loader.h"
|
||||
#include "blisp.h"
|
||||
|
||||
int64_t blisp_chip_bl70x_get_eflash_loader(uint8_t clk_type, uint8_t** firmware_buf_ptr)
|
||||
{
|
||||
uint8_t* firmware_buf = malloc(sizeof(bl70x_eflash_loader_bin));
|
||||
memcpy(firmware_buf, bl70x_eflash_loader_bin, sizeof(bl70x_eflash_loader_bin));
|
||||
*(firmware_buf + 0xE0) = 1; // TODO: 32 MHz clock
|
||||
*firmware_buf_ptr = firmware_buf;
|
||||
return sizeof(bl70x_eflash_loader_bin);
|
||||
}
|
||||
|
||||
struct blisp_chip blisp_chip_bl70x = {
|
||||
.type = BLISP_CHIP_BL70X,
|
||||
.type_str = "bl70x",
|
||||
.usb_isp_available = true,
|
||||
.default_xtal = "32m",
|
||||
.handshake_byte_multiplier = 0.003f,
|
||||
.needs_eflash_loader = true
|
||||
.load_eflash_loader = blisp_chip_bl70x_get_eflash_loader,
|
||||
.tcm_address = 0x22010000
|
||||
};
|
||||
|
||||
|
||||
@@ -7,5 +7,5 @@ struct blisp_chip blisp_chip_bl808 = {
|
||||
.usb_isp_available = true, // TODO: Only for BL808D :-(
|
||||
.default_xtal = "-", // ?
|
||||
.handshake_byte_multiplier = 0.003f,
|
||||
.needs_eflash_loader = false
|
||||
.get_eflash_loader = NULL
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user