Commit 9c7c0ae7 authored by Leo Li's avatar Leo Li Committed by Alex Deucher

drm/amd/display: Fully remove i2caux folder

This is a follow up to:
e28e1490794d ("drm/amd/display: Remove i2caux folder")

Some files were still left, so delete all of them.

CC: David Francis <David.Francis@amd.com>
CC: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarLeo Li <sunpeng.li@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 45a31b01
#
# Copyright 2017 Advanced Micro Devices, 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.
#
#
# Makefile for the 'i2c' sub-component of DAL.
# It provides the control and status of HW i2c engine of the adapter.
I2CAUX = aux_engine.o engine_base.o i2caux.o i2c_engine.o \
i2c_generic_hw_engine.o i2c_hw_engine.o i2c_sw_engine.o
AMD_DAL_I2CAUX = $(addprefix $(AMDDALPATH)/dc/i2caux/,$(I2CAUX))
AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX)
###############################################################################
# DCE 8x family
###############################################################################
I2CAUX_DCE80 = i2caux_dce80.o i2c_hw_engine_dce80.o \
i2c_sw_engine_dce80.o
AMD_DAL_I2CAUX_DCE80 = $(addprefix $(AMDDALPATH)/dc/i2caux/dce80/,$(I2CAUX_DCE80))
AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX_DCE80)
###############################################################################
# DCE 100 family
###############################################################################
I2CAUX_DCE100 = i2caux_dce100.o
AMD_DAL_I2CAUX_DCE100 = $(addprefix $(AMDDALPATH)/dc/i2caux/dce100/,$(I2CAUX_DCE100))
AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX_DCE100)
###############################################################################
# DCE 110 family
###############################################################################
I2CAUX_DCE110 = i2caux_dce110.o i2c_sw_engine_dce110.o i2c_hw_engine_dce110.o \
aux_engine_dce110.o
AMD_DAL_I2CAUX_DCE110 = $(addprefix $(AMDDALPATH)/dc/i2caux/dce110/,$(I2CAUX_DCE110))
AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX_DCE110)
###############################################################################
# DCE 112 family
###############################################################################
I2CAUX_DCE112 = i2caux_dce112.o
AMD_DAL_I2CAUX_DCE112 = $(addprefix $(AMDDALPATH)/dc/i2caux/dce112/,$(I2CAUX_DCE112))
AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX_DCE112)
###############################################################################
# DCN 1.0 family
###############################################################################
ifdef CONFIG_DRM_AMD_DC_DCN1_0
I2CAUX_DCN1 = i2caux_dcn10.o
AMD_DAL_I2CAUX_DCN1 = $(addprefix $(AMDDALPATH)/dc/i2caux/dcn10/,$(I2CAUX_DCN1))
AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX_DCN1)
endif
###############################################################################
# DCE 120 family
###############################################################################
I2CAUX_DCE120 = i2caux_dce120.o
AMD_DAL_I2CAUX_DCE120 = $(addprefix $(AMDDALPATH)/dc/i2caux/dce120/,$(I2CAUX_DCE120))
AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX_DCE120)
###############################################################################
# Diagnostics on FPGA
###############################################################################
I2CAUX_DIAG = i2caux_diag.o
AMD_DAL_I2CAUX_DIAG = $(addprefix $(AMDDALPATH)/dc/i2caux/diagnostics/,$(I2CAUX_DIAG))
AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX_DIAG)
/*
* Copyright 2012-15 Advanced Micro Devices, 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: AMD
*
*/
#include "dm_services.h"
#include "include/i2caux_interface.h"
#include "../i2caux.h"
#include "../engine.h"
#include "../i2c_engine.h"
#include "../i2c_sw_engine.h"
#include "../i2c_hw_engine.h"
#include "../dce110/i2caux_dce110.h"
#include "i2caux_dce112.h"
#include "../dce110/aux_engine_dce110.h"
#include "../dce110/i2c_hw_engine_dce110.h"
#include "dce/dce_11_2_d.h"
#include "dce/dce_11_2_sh_mask.h"
/* set register offset */
#define SR(reg_name)\
.reg_name = mm ## reg_name
/* set register offset with instance */
#define SRI(reg_name, block, id)\
.reg_name = mm ## block ## id ## _ ## reg_name
#define aux_regs(id)\
[id] = {\
AUX_COMMON_REG_LIST(id), \
.AUX_RESET_MASK = AUX_CONTROL__AUX_RESET_MASK \
}
#define hw_engine_regs(id)\
{\
I2C_HW_ENGINE_COMMON_REG_LIST(id) \
}
static const struct dce110_aux_registers dce112_aux_regs[] = {
aux_regs(0),
aux_regs(1),
aux_regs(2),
aux_regs(3),
aux_regs(4),
aux_regs(5),
};
static const struct dce110_i2c_hw_engine_registers dce112_hw_engine_regs[] = {
hw_engine_regs(1),
hw_engine_regs(2),
hw_engine_regs(3),
hw_engine_regs(4),
hw_engine_regs(5),
hw_engine_regs(6)
};
static const struct dce110_i2c_hw_engine_shift i2c_shift = {
I2C_COMMON_MASK_SH_LIST_DCE110(__SHIFT)
};
static const struct dce110_i2c_hw_engine_mask i2c_mask = {
I2C_COMMON_MASK_SH_LIST_DCE110(_MASK)
};
static void construct(
struct i2caux_dce110 *i2caux_dce110,
struct dc_context *ctx)
{
dal_i2caux_dce110_construct(i2caux_dce110,
ctx,
ARRAY_SIZE(dce112_aux_regs),
dce112_aux_regs,
dce112_hw_engine_regs,
&i2c_shift,
&i2c_mask);
}
/*
* dal_i2caux_dce110_create
*
* @brief
* public interface to allocate memory for DCE11 I2CAUX
*
* @param
* struct adapter_service *as - [in]
* struct dc_context *ctx - [in]
*
* @return
* pointer to the base struct of DCE11 I2CAUX
*/
struct i2caux *dal_i2caux_dce112_create(
struct dc_context *ctx)
{
struct i2caux_dce110 *i2caux_dce110 =
kzalloc(sizeof(struct i2caux_dce110), GFP_KERNEL);
if (!i2caux_dce110) {
ASSERT_CRITICAL(false);
return NULL;
}
construct(i2caux_dce110, ctx);
return &i2caux_dce110->base;
}
/*
* Copyright 2012-15 Advanced Micro Devices, 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: AMD
*
*/
#ifndef __DAL_I2C_AUX_DCE112_H__
#define __DAL_I2C_AUX_DCE112_H__
struct i2caux *dal_i2caux_dce112_create(
struct dc_context *ctx);
#endif /* __DAL_I2C_AUX_DCE112_H__ */
/*
* Copyright 2012-15 Advanced Micro Devices, 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: AMD
*
*/
#include "dm_services.h"
/*
* Pre-requisites: headers required by header of this unit
*/
#include "include/i2caux_interface.h"
#include "../engine.h"
#include "../i2c_engine.h"
#include "../i2c_sw_engine.h"
/*
* Header of this unit
*/
#include "i2c_sw_engine_dce80.h"
/*
* Post-requisites: headers required by this unit
*/
#include "dce/dce_8_0_d.h"
#include "dce/dce_8_0_sh_mask.h"
/*
* This unit
*/
/*
* @brief
* Cast 'struct i2c_sw_engine *'
* to 'struct i2c_sw_engine_dce80 *'
*/
#define FROM_I2C_SW_ENGINE(ptr) \
container_of((ptr), struct i2c_sw_engine_dce80, base)
/*
* @brief
* Cast 'struct i2c_engine *'
* to 'struct i2c_sw_engine_dce80 *'
*/
#define FROM_I2C_ENGINE(ptr) \
FROM_I2C_SW_ENGINE(container_of((ptr), struct i2c_sw_engine, base))
/*
* @brief
* Cast 'struct engine *'
* to 'struct i2c_sw_engine_dce80 *'
*/
#define FROM_ENGINE(ptr) \
FROM_I2C_ENGINE(container_of((ptr), struct i2c_engine, base))
static void release_engine(
struct engine *engine)
{
}
static void destruct(
struct i2c_sw_engine_dce80 *engine)
{
dal_i2c_sw_engine_destruct(&engine->base);
}
static void destroy(
struct i2c_engine **engine)
{
struct i2c_sw_engine_dce80 *sw_engine = FROM_I2C_ENGINE(*engine);
destruct(sw_engine);
kfree(sw_engine);
*engine = NULL;
}
static bool acquire_engine(
struct i2c_engine *engine,
struct ddc *ddc_handle)
{
return dal_i2caux_i2c_sw_engine_acquire_engine(engine, ddc_handle);
}
static const struct i2c_engine_funcs i2c_engine_funcs = {
.acquire_engine = acquire_engine,
.destroy = destroy,
.get_speed = dal_i2c_sw_engine_get_speed,
.set_speed = dal_i2c_sw_engine_set_speed,
.setup_engine = dal_i2c_engine_setup_i2c_engine,
.submit_channel_request = dal_i2c_sw_engine_submit_channel_request,
.process_channel_reply = dal_i2c_engine_process_channel_reply,
.get_channel_status = dal_i2c_sw_engine_get_channel_status,
};
static const struct engine_funcs engine_funcs = {
.release_engine = release_engine,
.get_engine_type = dal_i2c_sw_engine_get_engine_type,
.acquire = dal_i2c_engine_acquire,
.submit_request = dal_i2c_sw_engine_submit_request,
};
static void construct(
struct i2c_sw_engine_dce80 *engine,
const struct i2c_sw_engine_dce80_create_arg *arg)
{
struct i2c_sw_engine_create_arg arg_base;
arg_base.ctx = arg->ctx;
arg_base.default_speed = arg->default_speed;
dal_i2c_sw_engine_construct(&engine->base, &arg_base);
engine->base.base.base.funcs = &engine_funcs;
engine->base.base.funcs = &i2c_engine_funcs;
engine->base.default_speed = arg->default_speed;
engine->engine_id = arg->engine_id;
}
struct i2c_engine *dal_i2c_sw_engine_dce80_create(
const struct i2c_sw_engine_dce80_create_arg *arg)
{
struct i2c_sw_engine_dce80 *engine;
if (!arg) {
BREAK_TO_DEBUGGER();
return NULL;
}
engine = kzalloc(sizeof(struct i2c_sw_engine_dce80), GFP_KERNEL);
if (!engine) {
BREAK_TO_DEBUGGER();
return NULL;
}
construct(engine, arg);
return &engine->base.base;
}
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment