Commit ce12d794 authored by Alexei Fedorov's avatar Alexei Fedorov Committed by TrustedFirmware Code Review
Browse files

Merge "uniphier: replace DIV_ROUND_UP() with div_round_up() from utils_def.h" into integration

parents 3ee48f40 f5de1aba
/* /*
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include "uniphier.h" #include "uniphier.h"
#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
#define NAND_CMD_READ0 0 #define NAND_CMD_READ0 0
#define NAND_CMD_READSTART 0x30 #define NAND_CMD_READSTART 0x30
...@@ -166,7 +164,7 @@ static size_t __uniphier_nand_read(struct uniphier_nand *nand, int lba, ...@@ -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 pages_per_block = nand->pages_per_block;
int page_size = nand->page_size; int page_size = nand->page_size;
int blocks_to_skip = lba / pages_per_block; 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 page = lba % pages_per_block;
int block = 0; int block = 0;
uintptr_t p = buf; uintptr_t p = buf;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment