Lines Matching +full:reboot +full:- +full:offset
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (c) 2011-2013 Xilinx Inc.
9 #include <linux/reboot.h>
19 #define SLCR_REBOOT_STATUS_OFFSET 0x258 /* PS Reboot Status */
33 * zynq_slcr_write - Write to a register in SLCR block
36 * @offset: Register offset in SLCR block
40 static int zynq_slcr_write(u32 val, u32 offset) in zynq_slcr_write() argument
42 return regmap_write(zynq_slcr_regmap, offset, val); in zynq_slcr_write()
46 * zynq_slcr_read - Read a register in SLCR block
49 * @offset: Register offset in SLCR block
53 static int zynq_slcr_read(u32 *val, u32 offset) in zynq_slcr_read() argument
55 return regmap_read(zynq_slcr_regmap, offset, val); in zynq_slcr_read()
59 * zynq_slcr_unlock - Unlock SLCR registers
71 * zynq_slcr_get_device_id - Read device code id
87 * zynq_slcr_system_restart - Restart the entire system.
90 * @action: Reboot mode (unused)
99 u32 reboot; in zynq_slcr_system_restart() local
102 * Clear 0x0F000000 bits of reboot status register to workaround in zynq_slcr_system_restart()
103 * the FSBL not loading the bitstream after soft-reboot in zynq_slcr_system_restart()
106 zynq_slcr_read(&reboot, SLCR_REBOOT_STATUS_OFFSET); in zynq_slcr_system_restart()
107 zynq_slcr_write(reboot & 0xF0FFFFFF, SLCR_REBOOT_STATUS_OFFSET); in zynq_slcr_system_restart()
118 * zynq_slcr_cpu_start - Start cpu
135 * zynq_slcr_cpu_stop - Stop cpu
148 * zynq_slcr_cpu_state_read - Read cpu state
161 state &= 1 << (31 - cpu); in zynq_slcr_cpu_state_read()
167 * zynq_slcr_cpu_state_write - Write cpu state
169 * @die: cpu state - true if cpu is going to die
179 mask = 1 << (31 - cpu); in zynq_slcr_cpu_state_write()
188 * zynq_early_slcr_init - Early slcr init function
198 np = of_find_compatible_node(NULL, NULL, "xlnx,zynq-slcr"); in zynq_early_slcr_init()
210 np->data = (__force void *)zynq_slcr_base; in zynq_early_slcr_init()
212 zynq_slcr_regmap = syscon_regmap_lookup_by_compatible("xlnx,zynq-slcr"); in zynq_early_slcr_init()
214 pr_err("%s: failed to find zynq-slcr\n", __func__); in zynq_early_slcr_init()
216 return -ENODEV; in zynq_early_slcr_init()