Skip to content
GitLab
Menu
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
Jul 31, 2019
by
Alexei Fedorov
Committed by
TrustedFirmware Code Review
Jul 31, 2019
Browse files
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
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
;
...
...
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