linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c

/*
 * Copyright 2012 Red Hat Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: Ben Skeggs
 */
#include <subdev/bios.h>
#include <subdev/bios/bit.h>
#include <subdev/bios/bmp.h>
#include <subdev/bios/conn.h>
#include <subdev/bios/dcb.h>
#include <subdev/bios/dp.h>
#include <subdev/bios/gpio.h>
#include <subdev/bios/init.h>
#include <subdev/bios/ramcfg.h>

#include <subdev/devinit.h>
#include <subdev/gpio.h>
#include <subdev/i2c.h>
#include <subdev/vga.h>

#include <linux/kernel.h>

#define bioslog(lvl, fmt, args...)
#define cont(fmt, args...)
#define trace(fmt, args...)
#define warn(fmt, args...)
#define error(fmt, args...)

/******************************************************************************
 * init parser control flow helpers
 *****************************************************************************/

static inline bool
init_exec(struct nvbios_init *init)
{}

static inline void
init_exec_set(struct nvbios_init *init, bool exec)
{}

static inline void
init_exec_inv(struct nvbios_init *init)
{}

static inline void
init_exec_force(struct nvbios_init *init, bool exec)
{}

/******************************************************************************
 * init parser wrappers for normal register/i2c/whatever accessors
 *****************************************************************************/

static inline int
init_or(struct nvbios_init *init)
{}

static inline int
init_link(struct nvbios_init *init)
{}

static inline int
init_head(struct nvbios_init *init)
{}

static u8
init_conn(struct nvbios_init *init)
{}

static inline u32
init_nvreg(struct nvbios_init *init, u32 reg)
{}

static u32
init_rd32(struct nvbios_init *init, u32 reg)
{}

static void
init_wr32(struct nvbios_init *init, u32 reg, u32 val)
{}

static u32
init_mask(struct nvbios_init *init, u32 reg, u32 mask, u32 val)
{}

static u8
init_rdport(struct nvbios_init *init, u16 port)
{}

static void
init_wrport(struct nvbios_init *init, u16 port, u8 value)
{}

static u8
init_rdvgai(struct nvbios_init *init, u16 port, u8 index)
{}

static void
init_wrvgai(struct nvbios_init *init, u16 port, u8 index, u8 value)
{}

static struct i2c_adapter *
init_i2c(struct nvbios_init *init, int index)
{}

static int
init_rdi2cr(struct nvbios_init *init, u8 index, u8 addr, u8 reg)
{}

static int
init_wri2cr(struct nvbios_init *init, u8 index, u8 addr, u8 reg, u8 val)
{}

static struct nvkm_i2c_aux *
init_aux(struct nvbios_init *init)
{}

static u8
init_rdauxr(struct nvbios_init *init, u32 addr)
{}

static int
init_wrauxr(struct nvbios_init *init, u32 addr, u8 data)
{}

static void
init_prog_pll(struct nvbios_init *init, u32 id, u32 freq)
{}

/******************************************************************************
 * parsing of bios structures that are required to execute init tables
 *****************************************************************************/

static u16
init_table(struct nvkm_bios *bios, u16 *len)
{}

static u16
init_table_(struct nvbios_init *init, u16 offset, const char *name)
{}

#define init_script_table(b)
#define init_macro_index_table(b)
#define init_macro_table(b)
#define init_condition_table(b)
#define init_io_condition_table(b)
#define init_io_flag_condition_table(b)
#define init_function_table(b)
#define init_xlat_table(b)

static u16
init_script(struct nvkm_bios *bios, int index)
{}

static u16
init_unknown_script(struct nvkm_bios *bios)
{}

static u8
init_ram_restrict_group_count(struct nvbios_init *init)
{}

static u8
init_ram_restrict(struct nvbios_init *init)
{}

static u8
init_xlat_(struct nvbios_init *init, u8 index, u8 offset)
{}

/******************************************************************************
 * utility functions used by various init opcode handlers
 *****************************************************************************/

static bool
init_condition_met(struct nvbios_init *init, u8 cond)
{}

static bool
init_io_condition_met(struct nvbios_init *init, u8 cond)
{}

static bool
init_io_flag_condition_met(struct nvbios_init *init, u8 cond)
{}

static inline u32
init_shift(u32 data, u8 shift)
{}

static u32
init_tmds_reg(struct nvbios_init *init, u8 tmds)
{}

/******************************************************************************
 * init opcode handlers
 *****************************************************************************/

/*
 * init_reserved - stub for various unknown/unused single-byte opcodes
 *
 */
static void
init_reserved(struct nvbios_init *init)
{}

/*
 * INIT_DONE - opcode 0x71
 *
 */
static void
init_done(struct nvbios_init *init)
{}

/*
 * INIT_IO_RESTRICT_PROG - opcode 0x32
 *
 */
static void
init_io_restrict_prog(struct nvbios_init *init)
{}

/*
 * INIT_REPEAT - opcode 0x33
 *
 */
static void
init_repeat(struct nvbios_init *init)
{}

/*
 * INIT_IO_RESTRICT_PLL - opcode 0x34
 *
 */
static void
init_io_restrict_pll(struct nvbios_init *init)
{}

/*
 * INIT_END_REPEAT - opcode 0x36
 *
 */
static void
init_end_repeat(struct nvbios_init *init)
{}

/*
 * INIT_COPY - opcode 0x37
 *
 */
static void
init_copy(struct nvbios_init *init)
{}

/*
 * INIT_NOT - opcode 0x38
 *
 */
static void
init_not(struct nvbios_init *init)
{}

/*
 * INIT_IO_FLAG_CONDITION - opcode 0x39
 *
 */
static void
init_io_flag_condition(struct nvbios_init *init)
{}

/*
 * INIT_GENERIC_CONDITION - opcode 0x3a
 *
 */
static void
init_generic_condition(struct nvbios_init *init)
{}

/*
 * INIT_IO_MASK_OR - opcode 0x3b
 *
 */
static void
init_io_mask_or(struct nvbios_init *init)
{}

/*
 * INIT_IO_OR - opcode 0x3c
 *
 */
static void
init_io_or(struct nvbios_init *init)
{}

/*
 * INIT_ANDN_REG - opcode 0x47
 *
 */
static void
init_andn_reg(struct nvbios_init *init)
{}

/*
 * INIT_OR_REG - opcode 0x48
 *
 */
static void
init_or_reg(struct nvbios_init *init)
{}

/*
 * INIT_INDEX_ADDRESS_LATCHED - opcode 0x49
 *
 */
static void
init_idx_addr_latched(struct nvbios_init *init)
{}

/*
 * INIT_IO_RESTRICT_PLL2 - opcode 0x4a
 *
 */
static void
init_io_restrict_pll2(struct nvbios_init *init)
{}

/*
 * INIT_PLL2 - opcode 0x4b
 *
 */
static void
init_pll2(struct nvbios_init *init)
{}

/*
 * INIT_I2C_BYTE - opcode 0x4c
 *
 */
static void
init_i2c_byte(struct nvbios_init *init)
{}

/*
 * INIT_ZM_I2C_BYTE - opcode 0x4d
 *
 */
static void
init_zm_i2c_byte(struct nvbios_init *init)
{}

/*
 * INIT_ZM_I2C - opcode 0x4e
 *
 */
static void
init_zm_i2c(struct nvbios_init *init)
{}

/*
 * INIT_TMDS - opcode 0x4f
 *
 */
static void
init_tmds(struct nvbios_init *init)
{}

/*
 * INIT_ZM_TMDS_GROUP - opcode 0x50
 *
 */
static void
init_zm_tmds_group(struct nvbios_init *init)
{}

/*
 * INIT_CR_INDEX_ADDRESS_LATCHED - opcode 0x51
 *
 */
static void
init_cr_idx_adr_latch(struct nvbios_init *init)
{}

/*
 * INIT_CR - opcode 0x52
 *
 */
static void
init_cr(struct nvbios_init *init)
{}

/*
 * INIT_ZM_CR - opcode 0x53
 *
 */
static void
init_zm_cr(struct nvbios_init *init)
{}

/*
 * INIT_ZM_CR_GROUP - opcode 0x54
 *
 */
static void
init_zm_cr_group(struct nvbios_init *init)
{}

/*
 * INIT_CONDITION_TIME - opcode 0x56
 *
 */
static void
init_condition_time(struct nvbios_init *init)
{}

/*
 * INIT_LTIME - opcode 0x57
 *
 */
static void
init_ltime(struct nvbios_init *init)
{}

/*
 * INIT_ZM_REG_SEQUENCE - opcode 0x58
 *
 */
static void
init_zm_reg_sequence(struct nvbios_init *init)
{}

/*
 * INIT_PLL_INDIRECT - opcode 0x59
 *
 */
static void
init_pll_indirect(struct nvbios_init *init)
{}

/*
 * INIT_ZM_REG_INDIRECT - opcode 0x5a
 *
 */
static void
init_zm_reg_indirect(struct nvbios_init *init)
{}

/*
 * INIT_SUB_DIRECT - opcode 0x5b
 *
 */
static void
init_sub_direct(struct nvbios_init *init)
{}

/*
 * INIT_JUMP - opcode 0x5c
 *
 */
static void
init_jump(struct nvbios_init *init)
{}

/*
 * INIT_I2C_IF - opcode 0x5e
 *
 */
static void
init_i2c_if(struct nvbios_init *init)
{}

/*
 * INIT_COPY_NV_REG - opcode 0x5f
 *
 */
static void
init_copy_nv_reg(struct nvbios_init *init)
{}

/*
 * INIT_ZM_INDEX_IO - opcode 0x62
 *
 */
static void
init_zm_index_io(struct nvbios_init *init)
{}

/*
 * INIT_COMPUTE_MEM - opcode 0x63
 *
 */
static void
init_compute_mem(struct nvbios_init *init)
{}

/*
 * INIT_RESET - opcode 0x65
 *
 */
static void
init_reset(struct nvbios_init *init)
{}

/*
 * INIT_CONFIGURE_MEM - opcode 0x66
 *
 */
static u16
init_configure_mem_clk(struct nvbios_init *init)
{}

static void
init_configure_mem(struct nvbios_init *init)
{}

/*
 * INIT_CONFIGURE_CLK - opcode 0x67
 *
 */
static void
init_configure_clk(struct nvbios_init *init)
{}

/*
 * INIT_CONFIGURE_PREINIT - opcode 0x68
 *
 */
static void
init_configure_preinit(struct nvbios_init *init)
{}

/*
 * INIT_IO - opcode 0x69
 *
 */
static void
init_io(struct nvbios_init *init)
{}

/*
 * INIT_SUB - opcode 0x6b
 *
 */
static void
init_sub(struct nvbios_init *init)
{}

/*
 * INIT_RAM_CONDITION - opcode 0x6d
 *
 */
static void
init_ram_condition(struct nvbios_init *init)
{}

/*
 * INIT_NV_REG - opcode 0x6e
 *
 */
static void
init_nv_reg(struct nvbios_init *init)
{}

/*
 * INIT_MACRO - opcode 0x6f
 *
 */
static void
init_macro(struct nvbios_init *init)
{}

/*
 * INIT_RESUME - opcode 0x72
 *
 */
static void
init_resume(struct nvbios_init *init)
{}

/*
 * INIT_STRAP_CONDITION - opcode 0x73
 *
 */
static void
init_strap_condition(struct nvbios_init *init)
{}

/*
 * INIT_TIME - opcode 0x74
 *
 */
static void
init_time(struct nvbios_init *init)
{}

/*
 * INIT_CONDITION - opcode 0x75
 *
 */
static void
init_condition(struct nvbios_init *init)
{}

/*
 * INIT_IO_CONDITION - opcode 0x76
 *
 */
static void
init_io_condition(struct nvbios_init *init)
{}

/*
 * INIT_ZM_REG16 - opcode 0x77
 *
 */
static void
init_zm_reg16(struct nvbios_init *init)
{}

/*
 * INIT_INDEX_IO - opcode 0x78
 *
 */
static void
init_index_io(struct nvbios_init *init)
{}

/*
 * INIT_PLL - opcode 0x79
 *
 */
static void
init_pll(struct nvbios_init *init)
{}

/*
 * INIT_ZM_REG - opcode 0x7a
 *
 */
static void
init_zm_reg(struct nvbios_init *init)
{}

/*
 * INIT_RAM_RESTRICT_PLL - opcde 0x87
 *
 */
static void
init_ram_restrict_pll(struct nvbios_init *init)
{}

/*
 * INIT_RESET_BEGUN - opcode 0x8c
 *
 */
static void
init_reset_begun(struct nvbios_init *init)
{}

/*
 * INIT_RESET_END - opcode 0x8d
 *
 */
static void
init_reset_end(struct nvbios_init *init)
{}

/*
 * INIT_GPIO - opcode 0x8e
 *
 */
static void
init_gpio(struct nvbios_init *init)
{}

/*
 * INIT_RAM_RESTRICT_ZM_GROUP - opcode 0x8f
 *
 */
static void
init_ram_restrict_zm_reg_group(struct nvbios_init *init)
{}

/*
 * INIT_COPY_ZM_REG - opcode 0x90
 *
 */
static void
init_copy_zm_reg(struct nvbios_init *init)
{}

/*
 * INIT_ZM_REG_GROUP - opcode 0x91
 *
 */
static void
init_zm_reg_group(struct nvbios_init *init)
{}

/*
 * INIT_XLAT - opcode 0x96
 *
 */
static void
init_xlat(struct nvbios_init *init)
{}

/*
 * INIT_ZM_MASK_ADD - opcode 0x97
 *
 */
static void
init_zm_mask_add(struct nvbios_init *init)
{}

/*
 * INIT_AUXCH - opcode 0x98
 *
 */
static void
init_auxch(struct nvbios_init *init)
{}

/*
 * INIT_AUXCH - opcode 0x99
 *
 */
static void
init_zm_auxch(struct nvbios_init *init)
{}

/*
 * INIT_I2C_LONG_IF - opcode 0x9a
 *
 */
static void
init_i2c_long_if(struct nvbios_init *init)
{}

/*
 * INIT_GPIO_NE - opcode 0xa9
 *
 */
static void
init_gpio_ne(struct nvbios_init *init)
{}

static struct nvbios_init_opcode {} init_opcode[] =;

int
nvbios_exec(struct nvbios_init *init)
{}

int
nvbios_post(struct nvkm_subdev *subdev, bool execute)
{}