167e7c6cfSBen Skeggs /*
267e7c6cfSBen Skeggs * Copyright 2019 Red Hat Inc.
367e7c6cfSBen Skeggs *
467e7c6cfSBen Skeggs * Permission is hereby granted, free of charge, to any person obtaining a
567e7c6cfSBen Skeggs * copy of this software and associated documentation files (the "Software"),
667e7c6cfSBen Skeggs * to deal in the Software without restriction, including without limitation
767e7c6cfSBen Skeggs * the rights to use, copy, modify, merge, publish, distribute, sublicense,
867e7c6cfSBen Skeggs * and/or sell copies of the Software, and to permit persons to whom the
967e7c6cfSBen Skeggs * Software is furnished to do so, subject to the following conditions:
1067e7c6cfSBen Skeggs *
1167e7c6cfSBen Skeggs * The above copyright notice and this permission notice shall be included in
1267e7c6cfSBen Skeggs * all copies or substantial portions of the Software.
1367e7c6cfSBen Skeggs *
1467e7c6cfSBen Skeggs * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1567e7c6cfSBen Skeggs * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1667e7c6cfSBen Skeggs * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1767e7c6cfSBen Skeggs * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
1867e7c6cfSBen Skeggs * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1967e7c6cfSBen Skeggs * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2067e7c6cfSBen Skeggs * OTHER DEALINGS IN THE SOFTWARE.
2167e7c6cfSBen Skeggs */
2267e7c6cfSBen Skeggs #include "priv.h"
2367e7c6cfSBen Skeggs
2467e7c6cfSBen Skeggs #if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC)
2567e7c6cfSBen Skeggs MODULE_FIRMWARE("nvidia/gp10b/acr/bl.bin");
2667e7c6cfSBen Skeggs MODULE_FIRMWARE("nvidia/gp10b/acr/ucode_load.bin");
2767e7c6cfSBen Skeggs #endif
2867e7c6cfSBen Skeggs
2922dcda45SBen Skeggs static const struct nvkm_acr_hsf_fwif
3022dcda45SBen Skeggs gp10b_acr_load_fwif[] = {
31*2541626cSBen Skeggs { 0, gm200_acr_hsfw_ctor, &gm20b_acr_load_0, NVKM_ACR_HSF_PMU, 0, 0x00000010 },
3222dcda45SBen Skeggs {}
3322dcda45SBen Skeggs };
3422dcda45SBen Skeggs
3567e7c6cfSBen Skeggs static const struct nvkm_acr_func
3667e7c6cfSBen Skeggs gp10b_acr = {
3722dcda45SBen Skeggs .load = gp10b_acr_load_fwif,
3822dcda45SBen Skeggs .wpr_parse = gm200_acr_wpr_parse,
3922dcda45SBen Skeggs .wpr_layout = gm200_acr_wpr_layout,
4022dcda45SBen Skeggs .wpr_alloc = gm20b_acr_wpr_alloc,
4122dcda45SBen Skeggs .wpr_build = gm200_acr_wpr_build,
4222dcda45SBen Skeggs .wpr_patch = gm200_acr_wpr_patch,
4322dcda45SBen Skeggs .wpr_check = gm200_acr_wpr_check,
4422dcda45SBen Skeggs .init = gm200_acr_init,
4567e7c6cfSBen Skeggs };
4667e7c6cfSBen Skeggs
4767e7c6cfSBen Skeggs static const struct nvkm_acr_fwif
4867e7c6cfSBen Skeggs gp10b_acr_fwif[] = {
4967e7c6cfSBen Skeggs { 0, gm20b_acr_load, &gp10b_acr },
5090e9cf74SBen Skeggs { -1, gm200_acr_nofw, &gm200_acr },
5167e7c6cfSBen Skeggs {}
5267e7c6cfSBen Skeggs };
5367e7c6cfSBen Skeggs
5467e7c6cfSBen Skeggs int
gp10b_acr_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_acr ** pacr)55c288b4deSBen Skeggs gp10b_acr_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
56c288b4deSBen Skeggs struct nvkm_acr **pacr)
5767e7c6cfSBen Skeggs {
58c288b4deSBen Skeggs return nvkm_acr_new_(gp10b_acr_fwif, device, type, inst, pacr);
5967e7c6cfSBen Skeggs }
60