flash/nor: implement flash bank deallocation in drivers with simple alloc
All drivers which simply allocate one driver_priv memory block per each bank now use default_flash_free_driver_priv() Change-Id: I425bf4213c3632f02dbe11ab819c31eda9b2db62 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4417 Tested-by: jenkins Reviewed-by: Liviu Dudau <liviu@dudau.co.uk> Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>riscv-compliance-dev
parent
3d3b45af46
commit
7690a74b09
|
@ -901,4 +901,5 @@ struct flash_driver ambiqmicro_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = ambiqmicro_protect_check,
|
||||
.info = get_ambiqmicro_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -898,4 +898,5 @@ struct flash_driver ath79_flash = {
|
|||
.erase_check = ath79_flash_blank_check,
|
||||
.protect_check = ath79_protect_check,
|
||||
.info = get_ath79_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -739,4 +739,5 @@ struct flash_driver atsamv_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = samv_protect_check,
|
||||
.info = samv_get_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -487,4 +487,5 @@ struct flash_driver avr_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = avrf_protect_check,
|
||||
.info = avrf_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -3128,4 +3128,5 @@ struct flash_driver cfi_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = cfi_protect_check,
|
||||
.info = get_cfi_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1133,4 +1133,5 @@ struct flash_driver efm32_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = efm32x_protect_check,
|
||||
.info = get_efm32x_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -941,4 +941,5 @@ struct flash_driver em357_flash = {
|
|||
.auto_probe = em357_auto_probe,
|
||||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = em357_protect_check,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -136,5 +136,6 @@ struct flash_driver faux_flash = {
|
|||
.auto_probe = faux_probe,
|
||||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = faux_protect_check,
|
||||
.info = faux_info
|
||||
.info = faux_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -997,4 +997,5 @@ struct flash_driver fm3_flash = {
|
|||
.probe = fm3_probe,
|
||||
.auto_probe = fm3_auto_probe,
|
||||
.erase_check = default_flash_blank_check,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -719,4 +719,5 @@ struct flash_driver fm4_flash = {
|
|||
.erase = fm4_flash_erase,
|
||||
.erase_check = default_flash_blank_check,
|
||||
.write = fm4_flash_write,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -432,5 +432,6 @@ struct flash_driver jtagspi_flash = {
|
|||
.auto_probe = jtagspi_probe,
|
||||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = jtagspi_protect_check,
|
||||
.info = jtagspi_info
|
||||
.info = jtagspi_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1310,4 +1310,5 @@ struct flash_driver kinetis_ke_flash = {
|
|||
.erase_check = kinetis_ke_blank_check,
|
||||
.protect_check = kinetis_ke_protect_check,
|
||||
.info = kinetis_ke_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1579,4 +1579,5 @@ struct flash_driver lpc2000_flash = {
|
|||
.erase_check = lpc2000_erase_check,
|
||||
.protect_check = lpc2000_protect_check,
|
||||
.info = get_lpc2000_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -433,4 +433,5 @@ struct flash_driver lpc288x_flash = {
|
|||
.auto_probe = lpc288x_probe,
|
||||
.erase_check = lpc288x_erase_check,
|
||||
.protect_check = lpc288x_protect_check,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1598,4 +1598,5 @@ struct flash_driver lpc2900_flash = {
|
|||
.auto_probe = lpc2900_probe,
|
||||
.erase_check = lpc2900_erase_check,
|
||||
.protect_check = lpc2900_protect_check,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -942,4 +942,5 @@ struct flash_driver lpcspifi_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = lpcspifi_protect_check,
|
||||
.info = get_lpcspifi_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -633,4 +633,5 @@ struct flash_driver mdr_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = mdr_protect_check,
|
||||
.info = get_mdr_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -955,4 +955,5 @@ struct flash_driver mrvlqspi_flash = {
|
|||
.erase_check = mrvlqspi_flash_erase_check,
|
||||
.protect_check = mrvlqspi_protect_check,
|
||||
.info = mrvlqspi_get_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1741,4 +1741,5 @@ struct flash_driver niietcm4_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = niietcm4_protect_check,
|
||||
.info = get_niietcm4_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1880,4 +1880,5 @@ struct flash_driver numicro_flash = {
|
|||
.auto_probe = numicro_auto_probe,
|
||||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = numicro_protect_check,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -340,4 +340,5 @@ struct flash_driver ocl_flash = {
|
|||
.erase_check = ocl_erase_check,
|
||||
.protect_check = ocl_protect_check,
|
||||
.auto_probe = ocl_auto_probe,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -980,4 +980,5 @@ struct flash_driver pic32mx_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = pic32mx_protect_check,
|
||||
.info = pic32mx_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -963,4 +963,5 @@ struct flash_driver psoc4_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = psoc4_protect_check,
|
||||
.info = get_psoc4_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -982,4 +982,5 @@ struct flash_driver psoc6_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = psoc6_protect_check,
|
||||
.info = psoc6_get_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1122,5 +1122,6 @@ struct flash_driver sim3x_flash = {
|
|||
.auto_probe = sim3x_auto_probe,
|
||||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = sim3x_flash_protect_check,
|
||||
.info = sim3x_flash_info
|
||||
.info = sim3x_flash_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1452,4 +1452,5 @@ struct flash_driver stellaris_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = stellaris_protect_check,
|
||||
.info = get_stellaris_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1647,4 +1647,5 @@ struct flash_driver stm32f1x_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = stm32x_protect_check,
|
||||
.info = get_stm32x_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1634,4 +1634,5 @@ struct flash_driver stm32f2x_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = stm32x_protect_check,
|
||||
.info = get_stm32x_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1180,4 +1180,5 @@ struct flash_driver stm32h7x_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = stm32x_protect_check,
|
||||
.info = stm32x_get_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -953,4 +953,5 @@ struct flash_driver stm32l4x_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = stm32l4_protect_check,
|
||||
.info = get_stm32l4_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -965,6 +965,7 @@ struct flash_driver stm32lx_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = stm32lx_protect_check,
|
||||
.info = stm32lx_get_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
||||
/* Static methods implementation */
|
||||
|
|
|
@ -654,4 +654,5 @@ struct flash_driver stmsmi_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = stmsmi_protect_check,
|
||||
.info = get_stmsmi_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -812,4 +812,5 @@ struct flash_driver str7x_flash = {
|
|||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = str7x_protect_check,
|
||||
.info = get_str7x_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -679,4 +679,5 @@ struct flash_driver str9x_flash = {
|
|||
.auto_probe = str9x_probe,
|
||||
.erase_check = default_flash_blank_check,
|
||||
.protect_check = str9x_protect_check,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1207,4 +1207,5 @@ struct flash_driver str9xpec_flash = {
|
|||
.auto_probe = str9xpec_probe,
|
||||
.erase_check = str9xpec_erase_check,
|
||||
.protect_check = str9xpec_protect_check,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1186,4 +1186,5 @@ struct flash_driver tms470_flash = {
|
|||
.erase_check = tms470_erase_check,
|
||||
.protect_check = tms470_protect_check,
|
||||
.info = get_tms470_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -231,4 +231,5 @@ struct flash_driver virtual_flash = {
|
|||
.erase_check = virtual_blank_check,
|
||||
.protect_check = virtual_protect_check,
|
||||
.info = virtual_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -636,6 +636,7 @@ static int xcf_probe(struct flash_bank *bank)
|
|||
fill_sector_table(bank);
|
||||
|
||||
priv->probed = true;
|
||||
/* REVISIT: Why is unchanged bank->driver_priv rewritten by same value? */
|
||||
bank->driver_priv = priv;
|
||||
|
||||
LOG_INFO("product name: %s", product_name(bank));
|
||||
|
@ -893,5 +894,6 @@ struct flash_driver xcf_flash = {
|
|||
.auto_probe = xcf_auto_probe,
|
||||
.erase_check = xcf_erase_check,
|
||||
.protect_check = xcf_protect_check,
|
||||
.info = xcf_info
|
||||
.info = xcf_info,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -546,4 +546,5 @@ struct flash_driver xmc1xxx_flash = {
|
|||
.erase = xmc1xxx_erase,
|
||||
.erase_check = xmc1xxx_erase_check,
|
||||
.write = xmc1xxx_write,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
|
@ -1356,4 +1356,5 @@ struct flash_driver xmc4xxx_flash = {
|
|||
.info = xmc4xxx_get_info_command,
|
||||
.protect_check = xmc4xxx_protect_check,
|
||||
.protect = xmc4xxx_protect,
|
||||
.free_driver_priv = default_flash_free_driver_priv,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue