···11-/*22- * Copyright 2020 Advanced Micro Devices, Inc.33- *44- * Permission is hereby granted, free of charge, to any person obtaining a55- * copy of this software and associated documentation files (the "Software"),66- * to deal in the Software without restriction, including without limitation77- * the rights to use, copy, modify, merge, publish, distribute, sublicense,88- * and/or sell copies of the Software, and to permit persons to whom the99- * Software is furnished to do so, subject to the following conditions:1010- *1111- * The above copyright notice and this permission notice shall be included in1212- * all copies or substantial portions of the Software.1313- *1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR1515- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,1616- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL1717- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR1818- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,1919- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR2020- * OTHER DEALINGS IN THE SOFTWARE.2121- *2222- */2323-#include "amdgpu.h"2424-#include "nv.h"2525-2626-#include "soc15_common.h"2727-#include "soc15_hw_ip.h"2828-#include "beige_goby_ip_offset.h"2929-3030-int beige_goby_reg_base_init(struct amdgpu_device *adev)3131-{3232- /* HW has more IP blocks, only initialize the block needed by driver */3333- uint32_t i;3434- for (i = 0 ; i < MAX_INSTANCE ; ++i) {3535- adev->reg_offset[GC_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));3636- adev->reg_offset[HDP_HWIP][i] = (uint32_t *)(&(HDP_BASE.instance[i]));3737- adev->reg_offset[MMHUB_HWIP][i] = (uint32_t *)(&(MMHUB_BASE.instance[i]));3838- adev->reg_offset[ATHUB_HWIP][i] = (uint32_t *)(&(ATHUB_BASE.instance[i]));3939- adev->reg_offset[NBIO_HWIP][i] = (uint32_t *)(&(NBIO_BASE.instance[i]));4040- adev->reg_offset[MP0_HWIP][i] = (uint32_t *)(&(MP0_BASE.instance[i]));4141- adev->reg_offset[MP1_HWIP][i] = (uint32_t *)(&(MP1_BASE.instance[i]));4242- adev->reg_offset[VCN_HWIP][i] = (uint32_t *)(&(VCN0_BASE.instance[i]));4343- adev->reg_offset[DF_HWIP][i] = (uint32_t *)(&(DF_BASE.instance[i]));4444- adev->reg_offset[DCE_HWIP][i] = (uint32_t *)(&(DCN_BASE.instance[i]));4545- adev->reg_offset[OSSSYS_HWIP][i] = (uint32_t *)(&(OSSSYS_BASE.instance[i]));4646- adev->reg_offset[SDMA0_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4747- adev->reg_offset[SDMA1_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4848- adev->reg_offset[SDMA2_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4949- adev->reg_offset[SDMA3_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));5050- adev->reg_offset[SMUIO_HWIP][i] = (uint32_t *)(&(SMUIO_BASE.instance[i]));5151- adev->reg_offset[THM_HWIP][i] = (uint32_t *)(&(THM_BASE.instance[i]));5252- }5353- return 0;5454-}
···11-/*22- * Copyright 2018 Advanced Micro Devices, Inc.33- *44- * Permission is hereby granted, free of charge, to any person obtaining a55- * copy of this software and associated documentation files (the "Software"),66- * to deal in the Software without restriction, including without limitation77- * the rights to use, copy, modify, merge, publish, distribute, sublicense,88- * and/or sell copies of the Software, and to permit persons to whom the99- * Software is furnished to do so, subject to the following conditions:1010- *1111- * The above copyright notice and this permission notice shall be included in1212- * all copies or substantial portions of the Software.1313- *1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR1515- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,1616- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL1717- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR1818- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,1919- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR2020- * OTHER DEALINGS IN THE SOFTWARE.2121- *2222- */2323-#include "amdgpu.h"2424-#include "nv.h"2525-2626-#include "soc15_common.h"2727-#include "soc15_hw_ip.h"2828-#include "cyan_skillfish_ip_offset.h"2929-3030-int cyan_skillfish_reg_base_init(struct amdgpu_device *adev)3131-{3232- /* HW has more IP blocks, only initialized the blocke needed by driver */3333- uint32_t i;3434- for (i = 0 ; i < MAX_INSTANCE ; ++i) {3535- adev->reg_offset[GC_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));3636- adev->reg_offset[HDP_HWIP][i] = (uint32_t *)(&(HDP_BASE.instance[i]));3737- adev->reg_offset[MMHUB_HWIP][i] = (uint32_t *)(&(MMHUB_BASE.instance[i]));3838- adev->reg_offset[ATHUB_HWIP][i] = (uint32_t *)(&(ATHUB_BASE.instance[i]));3939- adev->reg_offset[NBIO_HWIP][i] = (uint32_t *)(&(NBIO_BASE.instance[i]));4040- adev->reg_offset[MP0_HWIP][i] = (uint32_t *)(&(MP0_BASE.instance[i]));4141- adev->reg_offset[MP1_HWIP][i] = (uint32_t *)(&(MP1_BASE.instance[i]));4242- adev->reg_offset[VCN_HWIP][i] = (uint32_t *)(&(UVD0_BASE.instance[i]));4343- adev->reg_offset[DF_HWIP][i] = (uint32_t *)(&(DF_BASE.instance[i]));4444- adev->reg_offset[DCE_HWIP][i] = (uint32_t *)(&(DMU_BASE.instance[i]));4545- adev->reg_offset[OSSSYS_HWIP][i] = (uint32_t *)(&(OSSSYS_BASE.instance[i]));4646- adev->reg_offset[SDMA0_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4747- adev->reg_offset[SDMA1_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4848- adev->reg_offset[SMUIO_HWIP][i] = (uint32_t *)(&(SMUIO_BASE.instance[i]));4949- }5050- return 0;5151-}
-55
drivers/gpu/drm/amd/amdgpu/navi10_reg_init.c
···11-/*22- * Copyright 2018 Advanced Micro Devices, Inc.33- *44- * Permission is hereby granted, free of charge, to any person obtaining a55- * copy of this software and associated documentation files (the "Software"),66- * to deal in the Software without restriction, including without limitation77- * the rights to use, copy, modify, merge, publish, distribute, sublicense,88- * and/or sell copies of the Software, and to permit persons to whom the99- * Software is furnished to do so, subject to the following conditions:1010- *1111- * The above copyright notice and this permission notice shall be included in1212- * all copies or substantial portions of the Software.1313- *1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR1515- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,1616- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL1717- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR1818- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,1919- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR2020- * OTHER DEALINGS IN THE SOFTWARE.2121- *2222- */2323-#include "amdgpu.h"2424-#include "nv.h"2525-2626-#include "soc15_common.h"2727-#include "navi10_ip_offset.h"2828-2929-int navi10_reg_base_init(struct amdgpu_device *adev)3030-{3131- int i;3232-3333- for (i = 0 ; i < MAX_INSTANCE ; ++i) {3434- adev->reg_offset[GC_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));3535- adev->reg_offset[HDP_HWIP][i] = (uint32_t *)(&(HDP_BASE.instance[i]));3636- adev->reg_offset[MMHUB_HWIP][i] = (uint32_t *)(&(MMHUB_BASE.instance[i]));3737- adev->reg_offset[ATHUB_HWIP][i] = (uint32_t *)(&(ATHUB_BASE.instance[i]));3838- adev->reg_offset[NBIO_HWIP][i] = (uint32_t *)(&(NBIO_BASE.instance[i]));3939- adev->reg_offset[MP0_HWIP][i] = (uint32_t *)(&(MP0_BASE.instance[i]));4040- adev->reg_offset[MP1_HWIP][i] = (uint32_t *)(&(MP1_BASE.instance[i]));4141- adev->reg_offset[VCN_HWIP][i] = (uint32_t *)(&(VCN_BASE.instance[i]));4242- adev->reg_offset[DF_HWIP][i] = (uint32_t *)(&(DF_BASE.instance[i]));4343- adev->reg_offset[DCE_HWIP][i] = (uint32_t *)(&(DCN_BASE.instance[i]));4444- adev->reg_offset[OSSSYS_HWIP][i] = (uint32_t *)(&(OSSSYS_BASE.instance[i]));4545- adev->reg_offset[SDMA0_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4646- adev->reg_offset[SDMA1_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4747- adev->reg_offset[SMUIO_HWIP][i] = (uint32_t *)(&(SMUIO_BASE.instance[i]));4848- adev->reg_offset[THM_HWIP][i] = (uint32_t *)(&(THM_BASE.instance[i]));4949- adev->reg_offset[CLK_HWIP][i] = (uint32_t *)(&(CLK_BASE.instance[i]));5050- }5151-5252- return 0;5353-}5454-5555-
-52
drivers/gpu/drm/amd/amdgpu/navi12_reg_init.c
···11-/*22- * Copyright 2018 Advanced Micro Devices, Inc.33- *44- * Permission is hereby granted, free of charge, to any person obtaining a55- * copy of this software and associated documentation files (the "Software"),66- * to deal in the Software without restriction, including without limitation77- * the rights to use, copy, modify, merge, publish, distribute, sublicense,88- * and/or sell copies of the Software, and to permit persons to whom the99- * Software is furnished to do so, subject to the following conditions:1010- *1111- * The above copyright notice and this permission notice shall be included in1212- * all copies or substantial portions of the Software.1313- *1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR1515- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,1616- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL1717- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR1818- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,1919- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR2020- * OTHER DEALINGS IN THE SOFTWARE.2121- *2222- */2323-#include "amdgpu.h"2424-#include "nv.h"2525-2626-#include "soc15_common.h"2727-#include "navi12_ip_offset.h"2828-2929-int navi12_reg_base_init(struct amdgpu_device *adev)3030-{3131- /* HW has more IP blocks, only initialized the blocks needed by driver */3232- uint32_t i;3333- for (i = 0 ; i < MAX_INSTANCE ; ++i) {3434- adev->reg_offset[GC_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));3535- adev->reg_offset[HDP_HWIP][i] = (uint32_t *)(&(HDP_BASE.instance[i]));3636- adev->reg_offset[MMHUB_HWIP][i] = (uint32_t *)(&(MMHUB_BASE.instance[i]));3737- adev->reg_offset[ATHUB_HWIP][i] = (uint32_t *)(&(ATHUB_BASE.instance[i]));3838- adev->reg_offset[NBIO_HWIP][i] = (uint32_t *)(&(NBIF0_BASE.instance[i]));3939- adev->reg_offset[MP0_HWIP][i] = (uint32_t *)(&(MP0_BASE.instance[i]));4040- adev->reg_offset[MP1_HWIP][i] = (uint32_t *)(&(MP1_BASE.instance[i]));4141- adev->reg_offset[VCN_HWIP][i] = (uint32_t *)(&(UVD0_BASE.instance[i]));4242- adev->reg_offset[DF_HWIP][i] = (uint32_t *)(&(DF_BASE.instance[i]));4343- adev->reg_offset[DCE_HWIP][i] = (uint32_t *)(&(DMU_BASE.instance[i]));4444- adev->reg_offset[OSSSYS_HWIP][i] = (uint32_t *)(&(OSSSYS_BASE.instance[i]));4545- adev->reg_offset[SDMA0_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4646- adev->reg_offset[SDMA1_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4747- adev->reg_offset[SMUIO_HWIP][i] = (uint32_t *)(&(SMUIO_BASE.instance[i]));4848- adev->reg_offset[THM_HWIP][i] = (uint32_t *)(&(THM_BASE.instance[i]));4949- adev->reg_offset[CLK_HWIP][i] = (uint32_t *)(&(CLK_BASE.instance[i]));5050- }5151- return 0;5252-}
-53
drivers/gpu/drm/amd/amdgpu/navi14_reg_init.c
···11-/*22- * Copyright 2018 Advanced Micro Devices, Inc.33- *44- * Permission is hereby granted, free of charge, to any person obtaining a55- * copy of this software and associated documentation files (the "Software"),66- * to deal in the Software without restriction, including without limitation77- * the rights to use, copy, modify, merge, publish, distribute, sublicense,88- * and/or sell copies of the Software, and to permit persons to whom the99- * Software is furnished to do so, subject to the following conditions:1010- *1111- * The above copyright notice and this permission notice shall be included in1212- * all copies or substantial portions of the Software.1313- *1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR1515- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,1616- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL1717- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR1818- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,1919- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR2020- * OTHER DEALINGS IN THE SOFTWARE.2121- *2222- */2323-#include "amdgpu.h"2424-#include "nv.h"2525-2626-#include "soc15_common.h"2727-#include "navi14_ip_offset.h"2828-2929-int navi14_reg_base_init(struct amdgpu_device *adev)3030-{3131- int i;3232-3333- for (i = 0 ; i < MAX_INSTANCE ; ++i) {3434- adev->reg_offset[GC_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));3535- adev->reg_offset[HDP_HWIP][i] = (uint32_t *)(&(HDP_BASE.instance[i]));3636- adev->reg_offset[MMHUB_HWIP][i] = (uint32_t *)(&(MMHUB_BASE.instance[i]));3737- adev->reg_offset[ATHUB_HWIP][i] = (uint32_t *)(&(ATHUB_BASE.instance[i]));3838- adev->reg_offset[NBIO_HWIP][i] = (uint32_t *)(&(NBIF0_BASE.instance[i]));3939- adev->reg_offset[MP0_HWIP][i] = (uint32_t *)(&(MP0_BASE.instance[i]));4040- adev->reg_offset[MP1_HWIP][i] = (uint32_t *)(&(MP1_BASE.instance[i]));4141- adev->reg_offset[VCN_HWIP][i] = (uint32_t *)(&(UVD0_BASE.instance[i]));4242- adev->reg_offset[DF_HWIP][i] = (uint32_t *)(&(DF_BASE.instance[i]));4343- adev->reg_offset[DCE_HWIP][i] = (uint32_t *)(&(DMU_BASE.instance[i]));4444- adev->reg_offset[OSSSYS_HWIP][i] = (uint32_t *)(&(OSSSYS_BASE.instance[i]));4545- adev->reg_offset[SDMA0_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4646- adev->reg_offset[SDMA1_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4747- adev->reg_offset[SMUIO_HWIP][i] = (uint32_t *)(&(SMUIO_BASE.instance[i]));4848- adev->reg_offset[THM_HWIP][i] = (uint32_t *)(&(THM_BASE.instance[i]));4949- adev->reg_offset[CLK_HWIP][i] = (uint32_t *)(&(CLK_BASE.instance[i]));5050- }5151-5252- return 0;5353-}
···11-/*22- * Copyright 2019 Advanced Micro Devices, Inc.33- *44- * Permission is hereby granted, free of charge, to any person obtaining a55- * copy of this software and associated documentation files (the "Software"),66- * to deal in the Software without restriction, including without limitation77- * the rights to use, copy, modify, merge, publish, distribute, sublicense,88- * and/or sell copies of the Software, and to permit persons to whom the99- * Software is furnished to do so, subject to the following conditions:1010- *1111- * The above copyright notice and this permission notice shall be included in1212- * all copies or substantial portions of the Software.1313- *1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR1515- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,1616- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL1717- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR1818- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,1919- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR2020- * OTHER DEALINGS IN THE SOFTWARE.2121- *2222- */2323-#include "amdgpu.h"2424-#include "nv.h"2525-2626-#include "soc15_common.h"2727-#include "soc15_hw_ip.h"2828-#include "sienna_cichlid_ip_offset.h"2929-3030-int sienna_cichlid_reg_base_init(struct amdgpu_device *adev)3131-{3232- /* HW has more IP blocks, only initialized the blocke needed by driver */3333- uint32_t i;3434- for (i = 0 ; i < MAX_INSTANCE ; ++i) {3535- adev->reg_offset[GC_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));3636- adev->reg_offset[HDP_HWIP][i] = (uint32_t *)(&(HDP_BASE.instance[i]));3737- adev->reg_offset[MMHUB_HWIP][i] = (uint32_t *)(&(MMHUB_BASE.instance[i]));3838- adev->reg_offset[ATHUB_HWIP][i] = (uint32_t *)(&(ATHUB_BASE.instance[i]));3939- adev->reg_offset[NBIO_HWIP][i] = (uint32_t *)(&(NBIO_BASE.instance[i]));4040- adev->reg_offset[MP0_HWIP][i] = (uint32_t *)(&(MP0_BASE.instance[i]));4141- adev->reg_offset[MP1_HWIP][i] = (uint32_t *)(&(MP1_BASE.instance[i]));4242- adev->reg_offset[VCN_HWIP][i] = (uint32_t *)(&(VCN_BASE.instance[i]));4343- adev->reg_offset[DF_HWIP][i] = (uint32_t *)(&(DF_BASE.instance[i]));4444- adev->reg_offset[DCE_HWIP][i] = (uint32_t *)(&(DCN_BASE.instance[i]));4545- adev->reg_offset[OSSSYS_HWIP][i] = (uint32_t *)(&(OSSSYS_BASE.instance[i]));4646- adev->reg_offset[SDMA0_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4747- adev->reg_offset[SDMA1_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4848- adev->reg_offset[SDMA2_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4949- adev->reg_offset[SDMA3_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));5050- adev->reg_offset[SMUIO_HWIP][i] = (uint32_t *)(&(SMUIO_BASE.instance[i]));5151- adev->reg_offset[THM_HWIP][i] = (uint32_t *)(&(THM_BASE.instance[i]));5252- }5353- return 0;5454-}
-50
drivers/gpu/drm/amd/amdgpu/vangogh_reg_init.c
···11-/*22- * Copyright 2019 Advanced Micro Devices, Inc.33- *44- * Permission is hereby granted, free of charge, to any person obtaining a55- * copy of this software and associated documentation files (the "Software"),66- * to deal in the Software without restriction, including without limitation77- * the rights to use, copy, modify, merge, publish, distribute, sublicense,88- * and/or sell copies of the Software, and to permit persons to whom the99- * Software is furnished to do so, subject to the following conditions:1010- *1111- * The above copyright notice and this permission notice shall be included in1212- * all copies or substantial portions of the Software.1313- *1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR1515- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,1616- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL1717- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR1818- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,1919- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR2020- * OTHER DEALINGS IN THE SOFTWARE.2121- *2222- */2323-#include "amdgpu.h"2424-#include "nv.h"2525-2626-#include "soc15_common.h"2727-#include "soc15_hw_ip.h"2828-#include "vangogh_ip_offset.h"2929-3030-void vangogh_reg_base_init(struct amdgpu_device *adev)3131-{3232- /* HW has more IP blocks, only initialized the blocke needed by driver */3333- uint32_t i;3434- for (i = 0 ; i < MAX_INSTANCE ; ++i) {3535- adev->reg_offset[GC_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));3636- adev->reg_offset[HDP_HWIP][i] = (uint32_t *)(&(HDP_BASE.instance[i]));3737- adev->reg_offset[MMHUB_HWIP][i] = (uint32_t *)(&(MMHUB_BASE.instance[i]));3838- adev->reg_offset[ATHUB_HWIP][i] = (uint32_t *)(&(ATHUB_BASE.instance[i]));3939- adev->reg_offset[NBIO_HWIP][i] = (uint32_t *)(&(NBIO_BASE.instance[i]));4040- adev->reg_offset[MP0_HWIP][i] = (uint32_t *)(&(MP0_BASE.instance[i]));4141- adev->reg_offset[MP1_HWIP][i] = (uint32_t *)(&(MP1_BASE.instance[i]));4242- adev->reg_offset[VCN_HWIP][i] = (uint32_t *)(&(VCN_BASE.instance[i]));4343- adev->reg_offset[DF_HWIP][i] = (uint32_t *)(&(DF_BASE.instance[i]));4444- adev->reg_offset[DCE_HWIP][i] = (uint32_t *)(&(DCN_BASE.instance[i]));4545- adev->reg_offset[OSSSYS_HWIP][i] = (uint32_t *)(&(OSSSYS_BASE.instance[i]));4646- adev->reg_offset[SDMA0_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));4747- adev->reg_offset[SMUIO_HWIP][i] = (uint32_t *)(&(SMUIO_BASE.instance[i]));4848- adev->reg_offset[THM_HWIP][i] = (uint32_t *)(&(THM_BASE.instance[i]));4949- }5050-}
-51
drivers/gpu/drm/amd/amdgpu/yellow_carp_reg_init.c
···11-/*22- * Copyright 2019 Advanced Micro Devices, Inc.33- *44- * Permission is hereby granted, free of charge, to any person obtaining a55- * copy of this software and associated documentation files (the "Software"),66- * to deal in the Software without restriction, including without limitation77- * the rights to use, copy, modify, merge, publish, distribute, sublicense,88- * and/or sell copies of the Software, and to permit persons to whom the99- * Software is furnished to do so, subject to the following conditions:1010- *1111- * The above copyright notice and this permission notice shall be included in1212- * all copies or substantial portions of the Software.1313- *1414- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR1515- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,1616- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL1717- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR1818- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,1919- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR2020- * OTHER DEALINGS IN THE SOFTWARE.2121- *2222- */2323-#include "amdgpu.h"2424-#include "nv.h"2525-2626-#include "soc15_common.h"2727-#include "soc15_hw_ip.h"2828-#include "yellow_carp_offset.h"2929-3030-int yellow_carp_reg_base_init(struct amdgpu_device *adev)3131-{3232- /* HW has more IP blocks, only initialized the block needed by driver */3333- uint32_t i;3434- for (i = 0 ; i < MAX_INSTANCE ; ++i) {3535- adev->reg_offset[GC_HWIP][i] = (uint32_t *)(&(GC_BASE.instance[i]));3636- adev->reg_offset[HDP_HWIP][i] = (uint32_t *)(&(HDP_BASE.instance[i]));3737- adev->reg_offset[MMHUB_HWIP][i] = (uint32_t *)(&(MMHUB_BASE.instance[i]));3838- adev->reg_offset[ATHUB_HWIP][i] = (uint32_t *)(&(ATHUB_BASE.instance[i]));3939- adev->reg_offset[NBIO_HWIP][i] = (uint32_t *)(&(NBIO_BASE.instance[i]));4040- adev->reg_offset[MP0_HWIP][i] = (uint32_t *)(&(MP0_BASE.instance[i]));4141- adev->reg_offset[MP1_HWIP][i] = (uint32_t *)(&(MP1_BASE.instance[i]));4242- adev->reg_offset[VCN_HWIP][i] = (uint32_t *)(&(VCN_BASE.instance[i]));4343- adev->reg_offset[DF_HWIP][i] = (uint32_t *)(&(DF_BASE.instance[i]));4444- adev->reg_offset[DCE_HWIP][i] = (uint32_t *)(&(DCN_BASE.instance[i]));4545- adev->reg_offset[OSSSYS_HWIP][i] = (uint32_t *)(&(OSSSYS_BASE.instance[i]));4646- adev->reg_offset[SDMA0_HWIP][i] = (uint32_t *)(&(SDMA0_BASE.instance[i]));4747- adev->reg_offset[SMUIO_HWIP][i] = (uint32_t *)(&(SMUIO_BASE.instance[i]));4848- adev->reg_offset[THM_HWIP][i] = (uint32_t *)(&(THM_BASE.instance[i]));4949- }5050- return 0;5151-}