aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/flash/nand/mxc.c4
-rw-r--r--src/flash/nor/at91sam3.c2
-rw-r--r--src/flash/nor/bluenrg-x.c12
-rw-r--r--src/flash/nor/kinetis_ke.c2
-rw-r--r--src/flash/nor/mrvlqspi.c4
-rw-r--r--src/flash/nor/psoc4.c2
-rw-r--r--src/flash/nor/psoc6.c2
-rw-r--r--src/flash/nor/tcl.c2
-rw-r--r--src/flash/nor/xcf.c4
9 files changed, 19 insertions, 15 deletions
diff --git a/src/flash/nand/mxc.c b/src/flash/nand/mxc.c
index 2c5de03..9002707 100644
--- a/src/flash/nand/mxc.c
+++ b/src/flash/nand/mxc.c
@@ -860,7 +860,7 @@ static int validate_target_state(struct nand_device *nand)
return ERROR_OK;
}
-int ecc_status_v1(struct nand_device *nand)
+static int ecc_status_v1(struct nand_device *nand)
{
struct mxc_nf_controller *mxc_nf_info = nand->controller_priv;
struct target *target = nand->target;
@@ -886,7 +886,7 @@ int ecc_status_v1(struct nand_device *nand)
return ERROR_OK;
}
-int ecc_status_v2(struct nand_device *nand)
+static int ecc_status_v2(struct nand_device *nand)
{
struct mxc_nf_controller *mxc_nf_info = nand->controller_priv;
struct target *target = nand->target;
diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c
index c9baffc..9c4afd4 100644
--- a/src/flash/nor/at91sam3.c
+++ b/src/flash/nor/at91sam3.c
@@ -3099,7 +3099,7 @@ FLASH_BANK_COMMAND_HANDLER(sam3_flash_bank_command)
* is owned by this bank. This simplification works only for one shot
* deallocation like current flash_free_all_banks()
*/
-void sam3_free_driver_priv(struct flash_bank *bank)
+static void sam3_free_driver_priv(struct flash_bank *bank)
{
struct sam3_chip *chip = all_sam3_chips;
while (chip) {
diff --git a/src/flash/nor/bluenrg-x.c b/src/flash/nor/bluenrg-x.c
index 57ea739..57aebc5 100644
--- a/src/flash/nor/bluenrg-x.c
+++ b/src/flash/nor/bluenrg-x.c
@@ -43,7 +43,7 @@ struct flash_ctrl_priv_data {
char *part_name;
};
-const struct flash_ctrl_priv_data flash_priv_data_1 = {
+static const struct flash_ctrl_priv_data flash_priv_data_1 = {
.die_id_reg = 0x4090001C,
.jtag_idcode_reg = 0x40900028,
.flash_base = 0x10040000,
@@ -53,7 +53,7 @@ const struct flash_ctrl_priv_data flash_priv_data_1 = {
.part_name = "BLUENRG-1",
};
-const struct flash_ctrl_priv_data flash_priv_data_2 = {
+static const struct flash_ctrl_priv_data flash_priv_data_2 = {
.die_id_reg = 0x4090001C,
.jtag_idcode_reg = 0x40900028,
.flash_base = 0x10040000,
@@ -63,7 +63,7 @@ const struct flash_ctrl_priv_data flash_priv_data_2 = {
.part_name = "BLUENRG-2",
};
-const struct flash_ctrl_priv_data flash_priv_data_lp = {
+static const struct flash_ctrl_priv_data flash_priv_data_lp = {
.die_id_reg = 0x40000000,
.jtag_idcode_reg = 0x40000004,
.flash_base = 0x10040000,
@@ -79,7 +79,11 @@ struct bluenrgx_flash_bank {
const struct flash_ctrl_priv_data *flash_ptr;
};
-const struct flash_ctrl_priv_data *flash_ctrl[] = {&flash_priv_data_1, &flash_priv_data_2, &flash_priv_data_lp};
+static const struct flash_ctrl_priv_data *flash_ctrl[] = {
+ &flash_priv_data_1,
+ &flash_priv_data_2,
+ &flash_priv_data_lp
+};
/* flash_bank bluenrg-x 0 0 0 0 <target#> */
FLASH_BANK_COMMAND_HANDLER(bluenrgx_flash_bank_command)
diff --git a/src/flash/nor/kinetis_ke.c b/src/flash/nor/kinetis_ke.c
index 349b256..5aba7fc 100644
--- a/src/flash/nor/kinetis_ke.c
+++ b/src/flash/nor/kinetis_ke.c
@@ -434,7 +434,7 @@ static int kinetis_ke_prepare_flash(struct flash_bank *bank)
return ERROR_OK;
}
-int kinetis_ke_stop_watchdog(struct target *target)
+static int kinetis_ke_stop_watchdog(struct target *target)
{
struct working_area *watchdog_algorithm;
struct armv7m_algorithm armv7m_info;
diff --git a/src/flash/nor/mrvlqspi.c b/src/flash/nor/mrvlqspi.c
index 3293e61..3f5ce2c 100644
--- a/src/flash/nor/mrvlqspi.c
+++ b/src/flash/nor/mrvlqspi.c
@@ -761,7 +761,7 @@ static int mrvlqspi_flash_write(struct flash_bank *bank, const uint8_t *buffer,
return retval;
}
-int mrvlqspi_flash_read(struct flash_bank *bank, uint8_t *buffer,
+static int mrvlqspi_flash_read(struct flash_bank *bank, uint8_t *buffer,
uint32_t offset, uint32_t count)
{
struct target *target = bank->target;
@@ -914,7 +914,7 @@ static int mrvlqspi_flash_erase_check(struct flash_bank *bank)
return ERROR_OK;
}
-int mrvlqspi_get_info(struct flash_bank *bank, char *buf, int buf_size)
+static int mrvlqspi_get_info(struct flash_bank *bank, char *buf, int buf_size)
{
struct mrvlqspi_flash_bank *mrvlqspi_info = bank->driver_priv;
diff --git a/src/flash/nor/psoc4.c b/src/flash/nor/psoc4.c
index 9c2fdf7..b606e18 100644
--- a/src/flash/nor/psoc4.c
+++ b/src/flash/nor/psoc4.c
@@ -139,7 +139,7 @@ struct psoc4_chip_family {
uint32_t flags;
};
-const struct psoc4_chip_family psoc4_families[] = {
+static const struct psoc4_chip_family psoc4_families[] = {
{ 0x93, "PSoC4100/4200", .flags = PSOC4_FAMILY_FLAG_LEGACY },
{ 0x9A, "PSoC4000", .flags = 0 },
{ 0x9E, "PSoC/PRoC BLE (119E)", .flags = 0 },
diff --git a/src/flash/nor/psoc6.c b/src/flash/nor/psoc6.c
index df151c1..30bf885 100644
--- a/src/flash/nor/psoc6.c
+++ b/src/flash/nor/psoc6.c
@@ -908,7 +908,7 @@ COMMAND_HANDLER(psoc6_handle_mass_erase_command)
* @param target current target
* @return ERROR_OK in case of success, ERROR_XXX code otherwise
*************************************************************************************************/
-int handle_reset_halt(struct target *target)
+static int handle_reset_halt(struct target *target)
{
int hr;
uint32_t reset_addr;
diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c
index e935b3b..386d73e 100644
--- a/src/flash/nor/tcl.c
+++ b/src/flash/nor/tcl.c
@@ -30,7 +30,7 @@
* Implements Tcl commands used to access NOR flash facilities.
*/
-COMMAND_HELPER(flash_command_get_bank_maybe_probe, unsigned name_index,
+static COMMAND_HELPER(flash_command_get_bank_maybe_probe, unsigned name_index,
struct flash_bank **bank, bool do_probe)
{
const char *name = CMD_ARGV[name_index];
diff --git a/src/flash/nor/xcf.c b/src/flash/nor/xcf.c
index 29eef2d..0cef43b 100644
--- a/src/flash/nor/xcf.c
+++ b/src/flash/nor/xcf.c
@@ -45,7 +45,7 @@
#define ID_XCF32P 0x05059093
#define ID_MEANINGFUL_MASK 0x0FFFFFFF
-const char *xcf_name_list[] = {
+static const char * const xcf_name_list[] = {
"XCF08P",
"XCF16P",
"XCF32P",
@@ -399,7 +399,7 @@ static void flip_u8(uint8_t *out, const uint8_t *in, int len)
* Function presumes need of bit reversing if it can not exactly detects
* the opposite.
*/
-bool need_bit_reverse(const uint8_t *buffer)
+static bool need_bit_reverse(const uint8_t *buffer)
{
const size_t L = 20;
uint8_t reference[L];