| #
583966da |
| 28-Mar-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: mtd: cfi_flash: Make live-tree compatible
Make the cfi_flash driver compatible with a live device tree.
Change-Id: Iec5b202b4ee94bbf3a129147037abe647978ab3f Signed-off-by: Mario Six <mari
UPSTREAM: mtd: cfi_flash: Make live-tree compatible
Make the cfi_flash driver compatible with a live device tree.
Change-Id: Iec5b202b4ee94bbf3a129147037abe647978ab3f Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 8bfeb33c463296af38432c3dbfb976f45545e381)
show more ...
|
| #
a30d1fa5 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Always define cfi_flash_num_flash_banks
The variable cfi_flash_num_flash_banks is defined iff CONFIG_SYS_MAX_FLASH_BANKS_DETECT is defined, but it is used unconditionally in the
UPSTREAM: cfi_flash: Always define cfi_flash_num_flash_banks
The variable cfi_flash_num_flash_banks is defined iff CONFIG_SYS_MAX_FLASH_BANKS_DETECT is defined, but it is used unconditionally in the function cfi_flash_init_dm. This leads to a undefined variable compile error when CONFIG_SYS_MAX_FLASH_BANKS_DETECT is not defined, but DM is enabled.
Fix this by always defining the cfi_flash_num_flash_banks variable.
Change-Id: I72ddbb2d98a1d4df41317ed8c80b1340d30f4513 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit d9a356972b7504e2e1b0a2b61ddc25a4452502e6)
show more ...
|
| #
4360a4ee |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix indention
When long expressions surrounded by parentheses are split into multiple lines, each consecutive line should be aligned with the corresponding parenthesis. Fix all
UPSTREAM: cfi_flash: Fix indention
When long expressions surrounded by parentheses are split into multiple lines, each consecutive line should be aligned with the corresponding parenthesis. Fix all instances where this occurs.
Change-Id: I4afe2615eaf3acd42bf8ced0fd393b63642b0e79 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit c0350fbf4c0e9f2d178d89aee49561ce2b4bf890)
show more ...
|
| #
e1eaec7f |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix long lines
Long lines (>80 characters) should be avoided where possible. Break up some long lines where it's not detrimental to readability.
Change-Id: I61c2b555c290fd9142e
UPSTREAM: cfi_flash: Fix long lines
Long lines (>80 characters) should be avoided where possible. Break up some long lines where it's not detrimental to readability.
Change-Id: I61c2b555c290fd9142ed7f3558e7e6e7ce95660a Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit ddcf05403dc2524e6aa8503e55cf5dc85afa13da)
show more ...
|
| #
73c05012 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Bound-check index before array access
In a while loop in cfi_flash.c the array "start" is accessed at the index "sector" before the index variable "sector" is bounds-checked, wh
UPSTREAM: cfi_flash: Bound-check index before array access
In a while loop in cfi_flash.c the array "start" is accessed at the index "sector" before the index variable "sector" is bounds-checked, which might lead to accesses beyond the bounds of the array.
Swap the order of the checks in the "&&" expression, so that the short-circuit evaluation prevents out-of-bounds array accesses.
Change-Id: I3d527b92af4dc6b71d442d196ab051dbb46d98cb Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 5701ba82894d679eb42df5d0b93a2d44b3df695d)
show more ...
|
| #
5acabbc5 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: flash: Fix spelling of "ERR_TIMOUT"
checkpatch.pl complains about the spelling of ERR_TIMOUT. Since the error is only used in a handful of files, we rename the error to ERR_TIMEOUT.
Chang
UPSTREAM: flash: Fix spelling of "ERR_TIMOUT"
checkpatch.pl complains about the spelling of ERR_TIMOUT. Since the error is only used in a handful of files, we rename the error to ERR_TIMEOUT.
Change-Id: If99b9c4f75aa0582da432b748a723e477e22759c Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 9dbaebcf9f401c5dcea762e34a3dc8ed10760623)
show more ...
|
| #
c06cb860 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Rename camel-case variables
Camel-case naming should be avoided. Rename two camel-case variables, and fix their usage accordingly.
Change-Id: Iff7bf46bd2c0911314a7b3097ed34886a
UPSTREAM: cfi_flash: Rename camel-case variables
Camel-case naming should be avoided. Rename two camel-case variables, and fix their usage accordingly.
Change-Id: Iff7bf46bd2c0911314a7b3097ed34886a1ed7887 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit c8a9a82c10e0c55f6cfa71cb174968cb54acfa5d)
show more ...
|
| #
f832bdc4 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix strings split across lines
Strings should not be split accross multiple lines. Where possible and not detrimental to readability, fix the instances where this occurs.
Chang
UPSTREAM: cfi_flash: Fix strings split across lines
Strings should not be split accross multiple lines. Where possible and not detrimental to readability, fix the instances where this occurs.
Change-Id: I27b78724fcb8e6c77bd490d30792a39d1c819e5a Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 876c52f3c35738eab091c0ef2fad28d8cbaa2c5f)
show more ...
|
| #
f97a5a7d |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Use u8 pointers instead of void pointers
According to the C standard, pointer arithmetic for pointers of type void is undefined behavior (the assumption that they're 8-bit wide
UPSTREAM: cfi_flash: Use u8 pointers instead of void pointers
According to the C standard, pointer arithmetic for pointers of type void is undefined behavior (the assumption that they're 8-bit wide is a GCC-specific assumption). In the interest of keeping the code standards-compliant, and also better communicate intent, switch all void* variables where pointer arithmetic is used to u8* variables.
Change-Id: Ie87afb412bb440dbbe374d65680ca1cf2467e02e Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 5312838dd5b3959907d6c4f0ec3e04954210fafc)
show more ...
|
| #
157fef68 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Remove assignments from if conditions
The condition in if statements should not be used for variable assignment. Instead, the assignment should be done in a separate step before
UPSTREAM: cfi_flash: Remove assignments from if conditions
The condition in if statements should not be used for variable assignment. Instead, the assignment should be done in a separate step beforehand. Fix all instances where this occurs.
Change-Id: I66229554513321ab62f2e94e50e3dd64f322fc3a Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit d3525b6bb0c39de537f0d2e79bb9ab9ad8fd8bf5)
show more ...
|
| #
fbe2879c |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Remove return from void function
void functions don't need an explicit return at the end.
Change-Id: I40c15dde8c217b5357c1d94fa8268b26d56db098 Signed-off-by: Mario Six <mario.s
UPSTREAM: cfi_flash: Remove return from void function
void functions don't need an explicit return at the end.
Change-Id: I40c15dde8c217b5357c1d94fa8268b26d56db098 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit ab61cfb857a14c4dd90a5d11c2f3064c28d5b3a1)
show more ...
|
| #
ee66e864 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix placement of brace
The opening brace of block statements should be attached to the statement itself, and not be on a separate line.
Change-Id: I3be9ccbb53b8362f1316ab905b0b
UPSTREAM: cfi_flash: Fix placement of brace
The opening brace of block statements should be attached to the statement itself, and not be on a separate line.
Change-Id: I3be9ccbb53b8362f1316ab905b0be8acb20652af Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 0cec0a12f9dba584ccf264329735819f8b04a66c)
show more ...
|
| #
286741e5 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix else after break
If in a loop, the if block in a if/else statement ends in a break, the statements in the else blockcan be extracted, since the break stops the execution.
C
UPSTREAM: cfi_flash: Fix else after break
If in a loop, the if block in a if/else statement ends in a break, the statements in the else blockcan be extracted, since the break stops the execution.
Change-Id: Iaed92e93ab451b38a6ea5cf0ed216d3fd39140cb Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 9860137fbcbacfb91069194f9635af0ed8288456)
show more ...
|
| #
0b1895ab |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix spelling of "Unknown"
"Unkown" should be spelled "Unknown".
Change-Id: I413087b08c11f177b582d1b36ebe4a226deab0f9 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by
UPSTREAM: cfi_flash: Fix spelling of "Unknown"
"Unkown" should be spelled "Unknown".
Change-Id: I413087b08c11f177b582d1b36ebe4a226deab0f9 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 9f720216b746f29606955baca9bf7211e35aaa53)
show more ...
|
| #
55356386 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Add missing braces in blocks
In if/else statements, either both blocks (if and else) should have braces or both blocks should not have braces, but mixed configurations are disco
UPSTREAM: cfi_flash: Add missing braces in blocks
In if/else statements, either both blocks (if and else) should have braces or both blocks should not have braces, but mixed configurations are discouraged. Fix all instances where this occurs.
Change-Id: I1b0232befa41199646d4c39c4d9f574811f22e50 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 12d7fed9b9ea1ad6646fd4724ccffa27e043f09b)
show more ...
|
| #
2c503658 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Remove unnecessary braces
"==" and "!=" bind tighter than the boolean operators, so parentheses around them in compound logical statements are unnecessary. Fix all instances whe
UPSTREAM: cfi_flash: Remove unnecessary braces
"==" and "!=" bind tighter than the boolean operators, so parentheses around them in compound logical statements are unnecessary. Fix all instances where this occurs.
Change-Id: I0a65785c58aaf17b7544a844f3023f285854b7d7 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 4f89da49e728653fbf4ac5d9b741be4f61496b25)
show more ...
|
| #
799ca3be |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix comment style
Comment blocks should end with a "*/" on a separate line, not with the "*/" attached to the end of the last line of text. Fix all instances where this occurs.
UPSTREAM: cfi_flash: Fix comment style
Comment blocks should end with a "*/" on a separate line, not with the "*/" attached to the end of the last line of text. Fix all instances where this occurs.
Change-Id: If8d6a5d95f085adb021a661b18504f7bca729398 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit a6d18f27c330a3d548625401ba898ca4f9718d7a)
show more ...
|
| #
7b160f45 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Use __func__ macro instead of function name
printf/debug statements should not include the file name as a hardcoded string, but instead use the __func__ macro. Fix all instances
UPSTREAM: cfi_flash: Use __func__ macro instead of function name
printf/debug statements should not include the file name as a hardcoded string, but instead use the __func__ macro. Fix all instances where this occurs.
Change-Id: Idf525ba89c83346ba836a078d8bc635e39393c80 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 38d2831d3b1bc618c36fcba855368e9ac239f3cc)
show more ...
|
| #
396774bd |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix logical continuations
When splitting long logical statements across multiple lines, the logical operators should be at the end of the lines. Fix all instances where this occ
UPSTREAM: cfi_flash: Fix logical continuations
When splitting long logical statements across multiple lines, the logical operators should be at the end of the lines. Fix all instances where this occurs.
Change-Id: I8f6945a4aca9d58297d4143507506504100968d9 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 88ecd8bf7cf04f2c08a1bcec862085e63f644efb)
show more ...
|
| #
8624e93c |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Remove braces for single-statement blocks
Blocks with a single statement should not be enclosed in braces. Fix all instances where this occurs.
Change-Id: I90f3722a558c3fa7df46
UPSTREAM: cfi_flash: Remove braces for single-statement blocks
Blocks with a single statement should not be enclosed in braces. Fix all instances where this occurs.
Change-Id: I90f3722a558c3fa7df4609e624c83926c1396180 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 0412e903e44eb18e689b8f11ab374146b3d5372a)
show more ...
|
| #
90d7c439 |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix missing/superfluous lines
There should be no consecutive blank lines, and no blank lines at the end of blocks. But there should be blank lines between variable declarations
UPSTREAM: cfi_flash: Fix missing/superfluous lines
There should be no consecutive blank lines, and no blank lines at the end of blocks. But there should be blank lines between variable declarations and code. Fix all instances where either occurs.
Change-Id: I0828119320b42e426cd3a01096a62670a919de7c Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 7223a8cb2756cafd3842758877bf7d865e1c1ed1)
show more ...
|
| #
21d4f88a |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix spacing around casts/operators
There should be spaces around operators, and no spaces between a cast and the variable its being applied to. Fix all instances where this occu
UPSTREAM: cfi_flash: Fix spacing around casts/operators
There should be spaces around operators, and no spaces between a cast and the variable its being applied to. Fix all instances where this occurs.
Change-Id: I0c474d82a4e003ede5004fa4320fe7ebda799cb3 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit 640f4e35deccbea377f543737594753ff5a44d95)
show more ...
|
| #
19048a7f |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix indent of case statements
case statements should be at the same level of indent as the switch keyword. Fix all instances where this occurs.
Change-Id: Ib98387df0728416b1d2b
UPSTREAM: cfi_flash: Fix indent of case statements
case statements should be at the same level of indent as the switch keyword. Fix all instances where this occurs.
Change-Id: Ib98387df0728416b1d2b0739fcd564656069b602 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit dde0913b8559a1bd049ac6e1d4086b930c5be845)
show more ...
|
| #
414bc35c |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix whitespace with casting
When casting to a pointer type, the asterisk should be attached to the type name, not separated by a space. Fix all instances where this occurs.
Cha
UPSTREAM: cfi_flash: Fix whitespace with casting
When casting to a pointer type, the asterisk should be attached to the type name, not separated by a space. Fix all instances where this occurs.
Change-Id: Idba3e3311f611f9efd31b333af3e6132f2efd11d Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit db91bb242f0e4d78c8309c8d81d7c25353cf068e)
show more ...
|
| #
2bec7b6e |
| 26-Jan-2018 |
Mario Six <mario.six@gdsys.cc> |
UPSTREAM: cfi_flash: Fix Parenthesis spacing
There should not be additional spaces when nesting parentheses ("( (...) )"). Fix all instances where this occurs.
Change-Id: Ibefb0101e211736ccf9e9baa8
UPSTREAM: cfi_flash: Fix Parenthesis spacing
There should not be additional spaces when nesting parentheses ("( (...) )"). Fix all instances where this occurs.
Change-Id: Ibefb0101e211736ccf9e9baa8dcd2816162f04b9 Signed-off-by: Mario Six <mario.six@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jon Lin <jon.lin@rock-chips.com> (cherry picked from commit b168386ba966f959fb183ceb200f11e4f6b3813f)
show more ...
|