joukkone commented on code in PR #14687: URL: https://github.com/apache/nuttx/pull/14687#discussion_r1838070111
########## arch/arm64/src/imx9/hardware/imx9_trdc.h: ########## @@ -0,0 +1,97 @@ +/**************************************************************************** + * arch/arm64/src/imx9/hardware/imx9_trdc.h + * + * 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. + * + ****************************************************************************/ + +#ifndef __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TRDC_H +#define __ARCH_ARM64_SRC_IMX9_HARDWARE_IMX9_TRDC_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include <hardware/imx9_memorymap.h> + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define IMX9_TRDC_HWCFG0 (IMX9_TRDC_BASE + 0xf0) + +#define IMX9_MBC0_MEM_GLBAC(n) (0x20 + (n << 2)) +#define IMX9_MBC_MEM_BLK_CFG_0(m, n) (0x200 * m + 0x40 + (n << 2)) +#define IMX9_MBC_MEM_BLK_CFG_I(m, n, i) (0x200 * m + 0x40 + (80 << 2) + (i - 1) * 0x28 + (n << 2)) +#define IMX9_MRC0_DOM_RGD_W(m, n) (0x100 * m + 0x40 + (n << 3)) + +#define ELE_MAX_MSG 255U +#define AHAB_VERSION 0x6 +#define AHAB_CMD_TAG 0x17 +#define AHAB_RESP_TAG 0xe1 +#define ELE_RELEASE_RDC_REQ (0xC4) +#define ELE_READ_FUSE_REQ (0x97) +#define ELE_OK 0xd6 + +#define FSB_BASE 0x47510000UL Review Comment: done ########## arch/arm64/src/imx9/imx9_trdc.c: ########## @@ -0,0 +1,929 @@ +/**************************************************************************** + * arch/arm64/src/imx9/imx9_trdc.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 <arch/board/board.h> + +#include "chip.h" +#include "arm64_internal.h" +#include "imx9_trdc.h" +#include <arch/board/imx9_trdc_config.h> + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define ARRAY_SIZE(a) \ Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org