Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
ce12d794
Commit
ce12d794
authored
5 years ago
by
Alexei Fedorov
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "uniphier: replace DIV_ROUND_UP() with div_round_up() from utils_def.h" into integration
parents
3ee48f40
f5de1aba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plat/socionext/uniphier/uniphier_nand.c
+2
-4
plat/socionext/uniphier/uniphier_nand.c
with
2 additions
and
4 deletions
+2
-4
plat/socionext/uniphier/uniphier_nand.c
View file @
ce12d794
/*
* Copyright (c) 2017-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -16,8 +16,6 @@
#include "uniphier.h"
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
#define NAND_CMD_READ0 0
#define NAND_CMD_READSTART 0x30
...
...
@@ -166,7 +164,7 @@ static size_t __uniphier_nand_read(struct uniphier_nand *nand, int lba,
int
pages_per_block
=
nand
->
pages_per_block
;
int
page_size
=
nand
->
page_size
;
int
blocks_to_skip
=
lba
/
pages_per_block
;
int
pages_to_read
=
DIV_ROUND_UP
(
size
,
page_size
);
int
pages_to_read
=
div_round_up
(
size
,
page_size
);
int
page
=
lba
%
pages_per_block
;
int
block
=
0
;
uintptr_t
p
=
buf
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help