On 2020-04-29 23:30, Manivannan Sadhasivam wrote:
+static int qcom_ipcc_probe(struct platform_device *pdev)
+{
+ struct qcom_ipcc_proto_data *proto_data;
+ int ret;
+
+ proto_data = devm_kzalloc(&pdev->dev, sizeof(*proto_data),
GFP_KERNEL);
+ if (!proto_data)
+ return -ENOMEM;
+
+ ipcc_proto_data = proto_data;
+ proto_data->dev = &pdev->dev;
+
+ proto_data->base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(proto_data->base)) {
+ dev_err(&pdev->dev, "Failed to ioremap the ipcc base addr\n");
+ return PTR_ERR(proto_data->base);
+ }
+
+ proto_data->irq = platform_get_irq(pdev, 0);
+ if (proto_data->irq < 0) {
+ dev_err(&pdev->dev, "Failed to get the IRQ\n");
+ return proto_data->irq;
+ }
+
+ /* Perform a SW reset on this client's protocol state */
+ writel(0x1, proto_data->base + IPCC_REG_CLIENT_CLEAR);
We can skip doing a SW reset here. Few of the subsystems may be brought
out of reset via the bootloader and the interrupts from them might be
pending. Doing a SW reset here would clear those interrupts.
Thank you.
Raghavendra