Skip to content

Commit

Permalink
arch/arm64/imx9: reset when psci not available
Browse files Browse the repository at this point in the history
provide up_systemreset when psci is disabled

Signed-off-by: Jouni Ukkonen <[email protected]>
  • Loading branch information
joukkone committed Oct 16, 2024
1 parent d7a198e commit 177aa5e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm64/src/imx9/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ ifeq ($(CONFIG_IMX9_BOOTLOADER), y)
CHIP_CSRCS += $(DDR_CSRCS)
endif
endif

ifneq ($(CONFI_IMX9_HAVE_ATF_FIRMWARE), y)
CHIP_CSRCS += imx9_reset.c
endif
50 changes: 50 additions & 0 deletions arch/arm64/src/imx9/imx9_reset.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/****************************************************************************
* arch/arm64/src/imx9/imx9_reset.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/

/****************************************************************************
* Included Files
****************************************************************************/

#include <nuttx/config.h>

#include <stdint.h>
#include <stdbool.h>
#include <errno.h>
#include <nuttx/arch.h>
#include <nuttx/clock.h>
#include <debug.h>
#include <sys/types.h>
#include <syslog.h>
#include <errno.h>
#include "imx9_pmic.h"

/****************************************************************************
* Public Functions
****************************************************************************/

void up_systemreset(void)
{
imx9_pmic_reset();

/* Wait for the reset */

while (1);
}

0 comments on commit 177aa5e

Please sign in to comment.