mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 05:31:32 +00:00
i2c: stm32f7: change setup struct to const
Change static array to const when it is useful to save memory (move stm32f7_setup=0x18 from .data to .rodata section) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
This commit is contained in:
parent
c0765f47d8
commit
c235b087b3
1 changed files with 2 additions and 2 deletions
|
@ -197,7 +197,7 @@ struct stm32_i2c_priv {
|
||||||
int speed;
|
int speed;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct stm32_i2c_spec i2c_specs[] = {
|
static const struct stm32_i2c_spec i2c_specs[] = {
|
||||||
[STM32_I2C_SPEED_STANDARD] = {
|
[STM32_I2C_SPEED_STANDARD] = {
|
||||||
.rate = STANDARD_RATE,
|
.rate = STANDARD_RATE,
|
||||||
.rate_min = 8000,
|
.rate_min = 8000,
|
||||||
|
@ -236,7 +236,7 @@ static struct stm32_i2c_spec i2c_specs[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct stm32_i2c_setup stm32f7_setup = {
|
static const struct stm32_i2c_setup stm32f7_setup = {
|
||||||
.rise_time = STM32_I2C_RISE_TIME_DEFAULT,
|
.rise_time = STM32_I2C_RISE_TIME_DEFAULT,
|
||||||
.fall_time = STM32_I2C_FALL_TIME_DEFAULT,
|
.fall_time = STM32_I2C_FALL_TIME_DEFAULT,
|
||||||
.dnf = STM32_I2C_DNF_DEFAULT,
|
.dnf = STM32_I2C_DNF_DEFAULT,
|
||||||
|
|
Loading…
Add table
Reference in a new issue