/* * 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 nv50_ram(p) … #include "ram.h" #include "ramseq.h" #include "nv50.h" #include <core/option.h> #include <subdev/bios.h> #include <subdev/bios/perf.h> #include <subdev/bios/pll.h> #include <subdev/bios/rammap.h> #include <subdev/bios/timing.h> #include <subdev/clk/pll.h> #include <subdev/gpio.h> struct nv50_ramseq { … }; struct nv50_ram { … }; #define T … static int nv50_ram_timing_calc(struct nv50_ram *ram, u32 *timing) { … } static int nv50_ram_timing_read(struct nv50_ram *ram, u32 *timing) { … } #undef T static void nvkm_sddr2_dll_reset(struct nv50_ramseq *hwsq) { … } static void nv50_ram_gpio(struct nv50_ramseq *hwsq, u8 tag, u32 val) { … } static int nv50_ram_calc(struct nvkm_ram *base, u32 freq) { … } static int nv50_ram_prog(struct nvkm_ram *base) { … } static void nv50_ram_tidy(struct nvkm_ram *base) { … } static const struct nvkm_ram_func nv50_ram_func = …; static u32 nv50_fb_vram_rblock(struct nvkm_ram *ram) { … } int nv50_ram_ctor(const struct nvkm_ram_func *func, struct nvkm_fb *fb, struct nvkm_ram *ram) { … } int nv50_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram) { … }