diff options
author | Iwona Winiarska <iwona.winiarska@intel.com> | 2021-11-20 01:05:15 +0300 |
---|---|---|
committer | Iwona Winiarska <iwona.winiarska@intel.com> | 2021-11-24 19:34:49 +0300 |
commit | df9f9a5d4a135de0d0a6c48598cceb4f85c14547 (patch) | |
tree | 89f74cc6e945bfad87ed06928567a818453aeede /drivers/i3c | |
parent | 14fcc87f2977c95e5632a316c33e6f5d061d9cce (diff) | |
download | linux-df9f9a5d4a135de0d0a6c48598cceb4f85c14547.tar.xz |
i3c: master: Remove aspeed-i3c-global
Intel-BMC Linux fork doesn't use aspeed-i3c-global.
Since it is not present upstream, remove it.
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Change-Id: I9718953aa2e85cbc3689373b6783e15b5faa93c0
Diffstat (limited to 'drivers/i3c')
-rw-r--r-- | drivers/i3c/master/Kconfig | 9 | ||||
-rw-r--r-- | drivers/i3c/master/Makefile | 1 | ||||
-rw-r--r-- | drivers/i3c/master/aspeed-i3c-global.c | 106 |
3 files changed, 0 insertions, 116 deletions
diff --git a/drivers/i3c/master/Kconfig b/drivers/i3c/master/Kconfig index 900b02be85a7..3b8f95916f46 100644 --- a/drivers/i3c/master/Kconfig +++ b/drivers/i3c/master/Kconfig @@ -43,12 +43,3 @@ config MIPI_I3C_HCI This driver can also be built as a module. If so, the module will be called mipi-i3c-hci. - -config ASPEED_I3C_MASTER - tristate "Aspeed I3C master driver" - depends on I3C - depends on MACH_ASPEED_G6 - select DW_I3C_MASTER - help - Aspeed I3C master controller is a Synopsys DesignWare I3C controller - plus additional global control. diff --git a/drivers/i3c/master/Makefile b/drivers/i3c/master/Makefile index ff773141e060..b3fee0f690b2 100644 --- a/drivers/i3c/master/Makefile +++ b/drivers/i3c/master/Makefile @@ -1,5 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-$(CONFIG_ASPEED_I3C_MASTER) += aspeed-i3c-global.o obj-$(CONFIG_CDNS_I3C_MASTER) += i3c-master-cdns.o obj-$(CONFIG_DW_I3C_MASTER) += dw-i3c-master.o obj-$(CONFIG_SVC_I3C_MASTER) += svc-i3c-master.o diff --git a/drivers/i3c/master/aspeed-i3c-global.c b/drivers/i3c/master/aspeed-i3c-global.c deleted file mode 100644 index 93292ad6652d..000000000000 --- a/drivers/i3c/master/aspeed-i3c-global.c +++ /dev/null @@ -1,106 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -// Copyright (C) 2019 ASPEED Technology Inc. - -#include <linux/clk.h> -#include <linux/irq.h> -#include <linux/irqchip.h> -#include <linux/irqchip/chained_irq.h> -#include <linux/irqdomain.h> -#include <linux/module.h> -#include <linux/of_platform.h> -#include <linux/platform_device.h> -#include <linux/of_address.h> -#include <linux/of_irq.h> -#include <linux/io.h> -#include <linux/reset.h> -#include <linux/delay.h> - -#define ASPEED_I3CG_CTRL(x) (0x10 + (x * 0x10)) -#define ASPEED_I3CG_SET(x) (0x14 + (x * 0x10)) - -#define DEF_SLV_INST_ID 0x4 -#define DEF_SLV_STATIC_ADDR 0x74 - -union i3c_set_reg { - uint32_t value; - struct { - unsigned int i2c_mode : 1; /* bit[0] */ - unsigned int test_mode : 1; /* bit[1] */ - unsigned int act_mode : 2; /* bit[ 3: 2] */ - unsigned int pending_int : 4; /* bit[ 7: 4] */ - unsigned int sa : 7; /* bit[14: 8] */ - unsigned int sa_en : 1; /* bit[15] */ - unsigned int inst_id : 4; /* bit[19:16] */ - unsigned int rsvd : 12; /* bit[31:20] */ - } fields; -}; - - -struct aspeed_i3c_global { - void __iomem *base; - struct reset_control *rst; -}; - -static const struct of_device_id aspeed_i3c_global_of_table[] = { - { .compatible = "aspeed,ast2600-i3c-global", }, - {}, -}; -MODULE_DEVICE_TABLE(of, aspeed_i3c_global_of_table); - -static int aspeed_i3c_global_probe(struct platform_device *pdev) -{ - struct aspeed_i3c_global *i3c_global; - union i3c_set_reg reg; - int i, ret; - u32 num_of_i3cs; - - i3c_global = devm_kzalloc(&pdev->dev, sizeof(*i3c_global), GFP_KERNEL); - if (!i3c_global) - return -ENOMEM; - - i3c_global->base = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(i3c_global->base)) - return PTR_ERR(i3c_global->base); - - i3c_global->rst = devm_reset_control_get(&pdev->dev, NULL); - if (IS_ERR(i3c_global->rst)) { - dev_err(&pdev->dev, - "missing or invalid reset controller device tree entry"); - return PTR_ERR(i3c_global->rst); - } - - reset_control_assert(i3c_global->rst); - udelay(3); - reset_control_deassert(i3c_global->rst); - - ret = of_property_read_u32(pdev->dev.of_node, "ni3cs", &num_of_i3cs); - if (ret < 0) { - dev_err(&pdev->dev, "unable to get number of i3c devices"); - return -EINVAL; - } - - reg.value = 0; - reg.fields.inst_id = DEF_SLV_INST_ID; - reg.fields.sa = DEF_SLV_STATIC_ADDR; - reg.fields.pending_int = 0xc; - reg.fields.act_mode = 0x1; - for (i = 0; i < num_of_i3cs; i++) - writel(reg.value, i3c_global->base + ASPEED_I3CG_SET(i)); - - dev_info(&pdev->dev, "i3c global control registered\n"); - - return 0; -} - -static struct platform_driver aspeed_i3c_driver = { - .probe = aspeed_i3c_global_probe, - .driver = { - .name = KBUILD_MODNAME, - .of_match_table = of_match_ptr(aspeed_i3c_global_of_table), - }, -}; -module_platform_driver(aspeed_i3c_driver); - -MODULE_AUTHOR("Ryan Chen"); -MODULE_DESCRIPTION("ASPEED I3C Global Driver"); -MODULE_LICENSE("GPL v2"); |