Skip to content

Commit

Permalink
memory: ti-aemif: Remove unnecessary local variables
Browse files Browse the repository at this point in the history
CS timings are copied to local variables that are then used as is,
without any modifications.

Remove these unneeded local variables and deal directly with the timings
stored in the struct aemif_cs_data.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/r/20241204094319.1050826-3-bastien.curutchet@bootlin.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
  • Loading branch information
Bastien Curutchet authored and Krzysztof Kozlowski committed Dec 9, 2024
1 parent 1ec0fa9 commit b3d57e1
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions drivers/memory/ti-aemif.c
Original file line number Diff line number Diff line change
@@ -174,22 +174,14 @@ static int aemif_config_abus(struct platform_device *pdev, int csnum)
{
struct aemif_device *aemif = platform_get_drvdata(pdev);
struct aemif_cs_data *data = &aemif->cs_data[csnum];
int ta, rhold, rstrobe, rsetup, whold, wstrobe, wsetup;
unsigned offset;
u32 set, val;

offset = A1CR_OFFSET + (data->cs - aemif->cs_offset) * 4;

ta = data->ta;
rhold = data->rhold;
rstrobe = data->rstrobe;
rsetup = data->rsetup;
whold = data->whold;
wstrobe = data->wstrobe;
wsetup = data->wsetup;

set = TA(ta) | RHOLD(rhold) | RSTROBE(rstrobe) | RSETUP(rsetup) |
WHOLD(whold) | WSTROBE(wstrobe) | WSETUP(wsetup);
set = TA(data->ta) |
RHOLD(data->rhold) | RSTROBE(data->rstrobe) | RSETUP(data->rsetup) |
WHOLD(data->whold) | WSTROBE(data->wstrobe) | WSETUP(data->wsetup);

set |= (data->asize & ACR_ASIZE_MASK);
if (data->enable_ew)

0 comments on commit b3d57e1

Please sign in to comment.