1896d3e43SSøren Schmidt#- 2*90737b63SGanbold Tsagaankhuu# SPDX-License-Identifier: BSD-2-Clause 30d4a240bSGanbold Tsagaankhuu# 4896d3e43SSøren Schmidt# Copyright (c) 2022 Soren Schmidt <sos@deepcore.dk> 5896d3e43SSøren Schmidt# All rights reserved. 6896d3e43SSøren Schmidt# 7896d3e43SSøren Schmidt# Redistribution and use in source and binary forms, with or without 8896d3e43SSøren Schmidt# modification, are permitted provided that the following conditions 9896d3e43SSøren Schmidt# are met: 10896d3e43SSøren Schmidt# 1. Redistributions of source code must retain the above copyright 11896d3e43SSøren Schmidt# notice, this list of conditions and the following disclaimer. 12896d3e43SSøren Schmidt# 2. Redistributions in binary form must reproduce the above copyright 13896d3e43SSøren Schmidt# notice, this list of conditions and the following disclaimer in the 14896d3e43SSøren Schmidt# documentation and/or other materials provided with the distribution. 15896d3e43SSøren Schmidt# 16896d3e43SSøren Schmidt# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17896d3e43SSøren Schmidt# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18896d3e43SSøren Schmidt# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19896d3e43SSøren Schmidt# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20896d3e43SSøren Schmidt# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21896d3e43SSøren Schmidt# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22896d3e43SSøren Schmidt# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23896d3e43SSøren Schmidt# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24896d3e43SSøren Schmidt# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25896d3e43SSøren Schmidt# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26896d3e43SSøren Schmidt# SUCH DAMAGE. 27896d3e43SSøren Schmidt# 28896d3e43SSøren Schmidt# 29896d3e43SSøren Schmidt 30896d3e43SSøren Schmidt#include <arm64/rockchip/rk_otp.h> 31896d3e43SSøren Schmidt 32896d3e43SSøren SchmidtINTERFACE rk_otp; 33896d3e43SSøren Schmidt 34896d3e43SSøren SchmidtHEADER { 35896d3e43SSøren Schmidt}; 36896d3e43SSøren Schmidt 37896d3e43SSøren Schmidt# 38896d3e43SSøren Schmidt# Initialize SoC specific registers. 39896d3e43SSøren Schmidt# 40896d3e43SSøren SchmidtMETHOD int read { 41896d3e43SSøren Schmidt device_t dev; 42896d3e43SSøren Schmidt void *buffer; 43896d3e43SSøren Schmidt int offset; 44896d3e43SSøren Schmidt int size; 45896d3e43SSøren Schmidt} DEFAULT rk_otp_read; 46