diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c index 4e2cee6b45ac..6675b9cc1f0c 100644 --- a/drivers/hwtracing/coresight/coresight-stm.c +++ b/drivers/hwtracing/coresight/coresight-stm.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2017, 2020, The Linux Foundation. All rights reserved. * * Description: CoreSight System Trace Macrocell driver * @@ -366,9 +366,6 @@ static ssize_t notrace stm_generic_packet(struct stm_data *stm_data, if (!(drvdata && local_read(&drvdata->mode))) return -EACCES; - if (!drvdata->master_enable) - return -EPERM; - if (channel >= drvdata->numsp) return -EINVAL; @@ -857,13 +854,6 @@ static void stm_init_generic_data(struct stm_drvdata *drvdata, drvdata->stm.set_options = stm_generic_set_options; } -static bool is_apps_debug_disabled(u32 val) -{ - val &= BIT(APPS_NIDEN_SHIFT); - - return val == 0; -} - static int stm_probe(struct amba_device *adev, const struct amba_id *id) { int ret; @@ -875,7 +865,6 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id) struct resource *res = &adev->res; struct resource ch_res; size_t bitmap_size; - uint32_t val; struct coresight_desc desc = { 0 }; desc.name = coresight_alloc_device_name(&stm_devs, dev); @@ -909,13 +898,6 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id) return PTR_ERR(base); drvdata->chs.base = base; - ret = nvmem_cell_read_u32(&adev->dev, "debug_fuse", &val); - if (!ret) - drvdata->master_enable = !is_apps_debug_disabled(val); - else - drvdata->master_enable = true; - - drvdata->write_bytes = stm_fundamental_data_size(drvdata); if (boot_nr_channel) @@ -969,9 +951,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id) pm_runtime_put(&adev->dev); - dev_info(dev, "%s initialized with master %s\n", - (char *)coresight_get_uci_data(id), - drvdata->master_enable ? "Enabled" : "Disabled"); + dev_info(dev, "%s initialized\n", (char *)coresight_get_uci_data(id)); return 0; stm_unregister: diff --git a/include/linux/coresight-stm.h b/include/linux/coresight-stm.h index 7b254fc9458e..b3b2922dcd5a 100644 --- a/include/linux/coresight-stm.h +++ b/include/linux/coresight-stm.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * Copyright (c) 2011-2012, 2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012, 2017, 2020, The Linux Foundation. All rights reserved. */ #ifndef __LINUX_CORESIGHT_STM_H_ #define __LINUX_CORESIGHT_STM_H_ @@ -83,8 +83,6 @@ struct stm_drvdata { spinlock_t spinlock; struct channel_space chs; bool enable; - struct channel_space debug_status_chs; - bool master_enable; DECLARE_BITMAP(entities, OST_ENTITY_MAX); struct stm_data stm; local_t mode;