Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kestrel Collaboration
Kestrel Firmware
Zephyr RTOS
Commits
0fafab9a
Commit
0fafab9a
authored
3 years ago
by
Raptor Engineering Development Team
Browse files
Options
Download
Email Patches
Plain Diff
Add Kestrel SoC reboot support
parent
eba63d4b
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
5 deletions
+50
-5
soc/powerpc/CMakeLists.txt
soc/powerpc/CMakeLists.txt
+5
-5
soc/powerpc/litex-kestrel/CMakeLists.txt
soc/powerpc/litex-kestrel/CMakeLists.txt
+9
-0
soc/powerpc/litex-kestrel/soc.c
soc/powerpc/litex-kestrel/soc.c
+36
-0
No files found.
soc/powerpc/CMakeLists.txt
View file @
0fafab9a
# SPDX-License-Identifier: Apache-2.0
#
if(SOC_FAMILY)
#
add_subdirectory(${SOC_FAMILY})
#
else()
#
add_subdirectory(${SOC_NAME})
#
endif()
if
(
SOC_FAMILY
)
add_subdirectory
(
${
SOC_FAMILY
}
)
else
()
add_subdirectory
(
${
SOC_NAME
}
)
endif
()
This diff is collapsed.
Click to expand it.
soc/powerpc/litex-kestrel/CMakeLists.txt
0 → 100644
View file @
0fafab9a
#
# Copyright (c) 2021 Raptor Engineering, LLC <sales@raptorengineering.com>
#
# SPDX-License-Identifier: Apache-2.0
#
zephyr_sources
(
soc.c
)
This diff is collapsed.
Click to expand it.
soc/powerpc/litex-kestrel/soc.c
View file @
0fafab9a
/*
* Copyright (c) 2021 Raptor Engineering, LLC <sales@raptorengineering.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel.h>
#include <init.h>
#include <device.h>
#include <logging/log.h>
#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL
LOG_MODULE_REGISTER
(
soc
);
#ifdef CONFIG_OPENPOWER_LITEX_IRQ
extern
void
microwatt_irq_set_base
(
void
*
ivt_base
);
#endif
// SoC base controller information
#define SOC_CTL_BASE DT_REG_ADDR(DT_INST(0, litex_soc_controller))
// Overrides the weak PowerPC implementation
// Reboot SoC
void
sys_arch_reboot
(
int
type
)
{
// Shut down interrupts
irq_lock
();
// Reset IRQ vector table base address
#ifdef CONFIG_OPENPOWER_LITEX_IRQ
microwatt_irq_set_base
(
0x0
);
#endif
// Hard reboot
*
((
uint8_t
*
)(
SOC_CTL_BASE
))
=
1
;
}
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