coresight: add coresight fuse state query
Add support to query CoreSight fuse state and fail the probe if any of the required fuse(s) are disabled. This enables a single image with CoreSight drivers compiled in to be run on both Hardware that has CoreSight functionality disabled via fuse or left enabled for use. Change-Id: Ib770cc7f76e2b0644bda9600c92fc3a26823452d Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
This commit is contained in:
parent
0af4fbd1b2
commit
49306401ba
|
@ -168,6 +168,9 @@ static int __devinit csr_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
struct coresight_desc *desc;
|
||||
|
||||
if (coresight_fuse_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
|
@ -388,6 +388,9 @@ static int __devinit cti_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
struct coresight_desc *desc;
|
||||
|
||||
if (coresight_fuse_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
|
@ -362,6 +362,9 @@ static int __devinit etb_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
struct coresight_desc *desc;
|
||||
|
||||
if (coresight_fuse_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
|
@ -2113,6 +2113,10 @@ static int __devinit etm_probe(struct platform_device *pdev)
|
|||
struct msm_client_dump dump;
|
||||
struct coresight_desc *desc;
|
||||
|
||||
if (coresight_fuse_access_disabled() ||
|
||||
coresight_fuse_apps_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
|
@ -174,6 +174,9 @@ static int __devinit funnel_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
struct coresight_desc *desc;
|
||||
|
||||
if (coresight_fuse_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
|
@ -211,6 +211,9 @@ static int __devinit hwevent_probe(struct platform_device *pdev)
|
|||
int ret, i;
|
||||
const char *hmux_name, *hclk_name;
|
||||
|
||||
if (coresight_fuse_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
|
@ -126,6 +126,9 @@ static int __devinit replicator_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
struct coresight_desc *desc;
|
||||
|
||||
if (coresight_fuse_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
|
@ -791,6 +791,9 @@ static int __devinit stm_probe(struct platform_device *pdev)
|
|||
size_t res_size, bitmap_size;
|
||||
struct coresight_desc *desc;
|
||||
|
||||
if (coresight_fuse_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
|
@ -1134,6 +1134,9 @@ static int __devinit tmc_probe(struct platform_device *pdev)
|
|||
struct coresight_cti_data *ctidata;
|
||||
struct coresight_desc *desc;
|
||||
|
||||
if (coresight_fuse_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
|
@ -717,6 +717,9 @@ static int __devinit tpiu_probe(struct platform_device *pdev)
|
|||
struct resource *res;
|
||||
struct coresight_desc *desc;
|
||||
|
||||
if (coresight_fuse_access_disabled())
|
||||
return -EPERM;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
pdata = of_get_coresight_platform_data(dev, pdev->dev.of_node);
|
||||
if (IS_ERR(pdata))
|
||||
|
|
Loading…
Reference in New Issue