mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 14:10:43 +00:00
95e9a8e2cb
Changes in relation to FriendlyARM's U-Boot nanopi2-v2016.01: - SPL not supported yet --> no spl-directory in arch/arm/mach-nexell. Appropriate line in Makefile removed. - clock.c: 'section(".data")' added to declaration of clk_periphs[] and core_hz. - Kconfig: Changes to have a structure like in mach-bcm283x/Kconfig, e.g. "config ..." entries moved from other Kconfig. - timer.c: 'section(".data")' added to declaration of timestamp and lastdec. - arch/arm/mach-nexell/serial.c removed because this is for the UARTs of the S5P6818 SoC which is not supported yet. S5P4418 UARTs are different, here the (existing) PL011-code is used. - '#ifdef CONFIG...' changed to 'if (IS_ENABLED(CONFIG...))' where possible (and similar). Signed-off-by: Stefan Bosch <stefan_b@posteo.net>
33 lines
855 B
C
33 lines
855 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* (C) Copyright 2016 Nexell
|
|
* Youngbok, Park <park@nexell.co.kr>
|
|
*/
|
|
|
|
/*
|
|
*FIXME : Not support device tree & reset control driver.
|
|
* will remove after support device tree & reset control driver.
|
|
*/
|
|
#include <common.h>
|
|
#include <asm/io.h>
|
|
#include <asm/arch/nexell.h>
|
|
#include <asm/arch/reset.h>
|
|
|
|
struct nx_rstcon_registerset {
|
|
u32 regrst[(NUMBER_OF_RESET_MODULE_PIN + 31) >> 5];
|
|
};
|
|
|
|
static struct nx_rstcon_registerset *nx_rstcon =
|
|
(struct nx_rstcon_registerset *)PHY_BASEADDR_RSTCON;
|
|
|
|
void nx_rstcon_setrst(u32 rstindex, enum rstcon status)
|
|
{
|
|
u32 regnum, bitpos, curstat;
|
|
|
|
regnum = rstindex >> 5;
|
|
curstat = (u32)readl(&nx_rstcon->regrst[regnum]);
|
|
bitpos = rstindex & 0x1f;
|
|
curstat &= ~(1UL << bitpos);
|
|
curstat |= (status & 0x01) << bitpos;
|
|
writel(curstat, &nx_rstcon->regrst[regnum]);
|
|
}
|