linux/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgk104.c

/*
 * Copyright 2013 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
 */
#define gk104_ram(p)
#include "ram.h"
#include "ramfuc.h"

#include <core/option.h>
#include <subdev/bios.h>
#include <subdev/bios/init.h>
#include <subdev/bios/M0205.h>
#include <subdev/bios/M0209.h>
#include <subdev/bios/pll.h>
#include <subdev/bios/rammap.h>
#include <subdev/bios/timing.h>
#include <subdev/clk.h>
#include <subdev/clk/pll.h>
#include <subdev/gpio.h>

struct gk104_ramfuc {};

struct gk104_ram {};

/*******************************************************************************
 * GDDR5
 ******************************************************************************/
static void
gk104_ram_train(struct gk104_ramfuc *fuc, u32 mask, u32 data)
{}

static void
r1373f4_init(struct gk104_ramfuc *fuc)
{}

static void
r1373f4_fini(struct gk104_ramfuc *fuc)
{}

static void
gk104_ram_nuts(struct gk104_ram *ram, struct ramfuc_reg *reg,
	       u32 _mask, u32 _data, u32 _copy)
{}
#define ram_nuts(s,r,m,d,c)

static int
gk104_ram_calc_gddr5(struct gk104_ram *ram, u32 freq)
{}

/*******************************************************************************
 * DDR3
 ******************************************************************************/

static void
nvkm_sddr3_dll_reset(struct gk104_ramfuc *fuc)
{}

static void
nvkm_sddr3_dll_disable(struct gk104_ramfuc *fuc)
{}

static int
gk104_ram_calc_sddr3(struct gk104_ram *ram, u32 freq)
{}

/*******************************************************************************
 * main hooks
 ******************************************************************************/

static int
gk104_ram_calc_data(struct gk104_ram *ram, u32 khz, struct nvkm_ram_data *data)
{}

static int
gk104_calc_pll_output(int fN, int M, int N, int P, int clk)
{}

static int
gk104_pll_calc_hiclk(int target_khz, int crystal,
		int *N1, int *fN1, int *M1, int *P1,
		int *N2, int *M2, int *P2)
{}

static int
gk104_ram_calc_xits(struct gk104_ram *ram, struct nvkm_ram_data *next)
{}

int
gk104_ram_calc(struct nvkm_ram *base, u32 freq)
{}

static void
gk104_ram_prog_0(struct gk104_ram *ram, u32 freq)
{}

int
gk104_ram_prog(struct nvkm_ram *base)
{}

void
gk104_ram_tidy(struct nvkm_ram *base)
{}

struct gk104_ram_train {};

static int
gk104_ram_train_type(struct nvkm_ram *ram, int i, u8 ramcfg,
		     struct gk104_ram_train *train)
{}

static int
gk104_ram_train_init_0(struct nvkm_ram *ram, struct gk104_ram_train *train)
{}

static int
gk104_ram_train_init(struct nvkm_ram *ram)
{}

int
gk104_ram_init(struct nvkm_ram *ram)
{}

static int
gk104_ram_ctor_data(struct gk104_ram *ram, u8 ramcfg, int i)
{}

void *
gk104_ram_dtor(struct nvkm_ram *base)
{}

int
gk104_ram_new_(const struct nvkm_ram_func *func, struct nvkm_fb *fb,
	       struct nvkm_ram **pram)
{}

static const struct nvkm_ram_func
gk104_ram =;

int
gk104_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
{}