summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2984ad8)
raw | patch | inline | side by side (parent: 2984ad8)
author | Suman Anna <s-anna@ti.com> | |
Fri, 15 Feb 2019 18:00:32 +0000 (12:00 -0600) | ||
committer | Suman Anna <s-anna@ti.com> | |
Sun, 24 Feb 2019 01:20:48 +0000 (19:20 -0600) |
Enhance all the PRUSS platform drivers to support the PRU-ICSS1
sub-system on the AM437x family of SoCs. AM437x has two PRU-ICSS
instances, and support has been added only for the PRU-ICSS1 at
the moment. PRU-ICSS1 on AM437x is very similar to the PRU-ICSS
on AM33xx except for few minor differences - increased Instruction
RAM, increased Shared Data RAM2, and 1 less interrupt (PRUSS host
interrupt 7 which is redirected to the other PRUSS) towards the
MPU INTC.
The adaptation uses newly introduced compatibles in each driver
and relying on match data within the PRUSS INTC and PRUSS SoC bus
drivers to account for the SoC-level integration differences. The
initial names for the firmware images for each PRU core are
retrieved from DT nodes, and can be adjusted through sysfs if
required.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
sub-system on the AM437x family of SoCs. AM437x has two PRU-ICSS
instances, and support has been added only for the PRU-ICSS1 at
the moment. PRU-ICSS1 on AM437x is very similar to the PRU-ICSS
on AM33xx except for few minor differences - increased Instruction
RAM, increased Shared Data RAM2, and 1 less interrupt (PRUSS host
interrupt 7 which is redirected to the other PRUSS) towards the
MPU INTC.
The adaptation uses newly introduced compatibles in each driver
and relying on match data within the PRUSS INTC and PRUSS SoC bus
drivers to account for the SoC-level integration differences. The
initial names for the firmware images for each PRU core are
retrieved from DT nodes, and can be adjusted through sysfs if
required.
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
index c2fd4f14a732efc4dabf3bc54e3f67786a1a0b64..ee25959be1954339cad84061098f3632123a9af9 100644 (file)
"host2", "host3", "host4", "host5", "host6", "host7", "host8", "host9",
};
+/**
+ * struct pruss_intc_match_data - match data to handle SoC variations
+ * @no_host7_intr: flag denoting the absence of host7 interrupt into MPU
+ */
+struct pruss_intc_match_data {
+ bool no_host7_intr;
+};
+
/**
* struct pruss_intc - PRUSS interrupt controller structure
* @pruss: back-reference to parent PRUSS structure
struct resource *res;
struct irq_chip *irqchip;
int i, irq;
+ const struct pruss_intc_match_data *data;
+ bool skip_host7;
+
+ data = of_device_get_match_data(dev);
+ skip_host7 = data ? data->no_host7_intr : false;
intc = devm_kzalloc(dev, sizeof(*intc), GFP_KERNEL);
if (!intc)
for (i = 0; i < MAX_HOST_NUM_IRQS; i++) {
irq = platform_get_irq_byname(ppdev, irq_names[i]);
if (irq < 0) {
+ if (!strcmp(irq_names[i], "host7") && !!skip_host7)
+ continue;
+
dev_err(dev->parent, "platform_get_irq_byname failed for %s : %d\n",
irq_names[i], irq);
goto fail_irq;
return 0;
}
+static const struct pruss_intc_match_data am437x_pruss_intc_data = {
+ .no_host7_intr = true,
+};
+
static const struct of_device_id pruss_intc_of_match[] = {
- { .compatible = "ti,am3356-pruss-intc", },
+ {
+ .compatible = "ti,am3356-pruss-intc",
+ .data = NULL,
+ },
+ {
+ .compatible = "ti,am4376-pruss-intc",
+ .data = &am437x_pruss_intc_data,
+ },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, pruss_intc_of_match);
index d23f9d5654652ce1406dbe31fddca99a613ccc26..6551dc790b55a454366f6bb2272b95c69e103a25 100644 (file)
static const struct of_device_id pru_rproc_match[] = {
{ .compatible = "ti,am3356-pru", },
+ { .compatible = "ti,am4376-pru", },
{},
};
MODULE_DEVICE_TABLE(of, pru_rproc_match);
diff --git a/drivers/soc/ti/Kconfig b/drivers/soc/ti/Kconfig
index 35f38272f8b0c07e07bc03d97c4b7db5e5b4ae54..f23db2e8306337a5cba0d6cc7d12891460843c6d 100644 (file)
--- a/drivers/soc/ti/Kconfig
+++ b/drivers/soc/ti/Kconfig
config TI_PRUSS
tristate "TI PRU-ICSS Subsystem Platform drivers"
- depends on SOC_AM33XX
+ depends on SOC_AM33XX || SOC_AM43XX
select MFD_SYSCON
help
TI PRU-ICSS Subsystem platform specific support.
diff --git a/drivers/soc/ti/pruss.c b/drivers/soc/ti/pruss.c
index 9242458f9fd1bfd53b80ad94308eb093a00d6ac4..86805a3328be00520e0c0266635c7142bc3f9152 100644 (file)
--- a/drivers/soc/ti/pruss.c
+++ b/drivers/soc/ti/pruss.c
}
static const struct of_device_id pruss_of_match[] = {
- { .compatible = "ti,am3356-pruss", },
+ { .compatible = "ti,am3356-pruss", .data = NULL, },
+ { .compatible = "ti,am4376-pruss", .data = NULL, },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, pruss_of_match);
index cbeff5d00518069f00d90f53006301da2e1734b9..d06fe9c091da2c6c74c7a69151bf31b4a9503b63 100644 (file)
.has_reset = true,
};
+static const struct pruss_soc_bus_match_data am437x_data = {
+ .has_reset = true,
+};
+
static const struct of_device_id pruss_soc_bus_of_match[] = {
{ .compatible = "ti,am3356-pruss-soc-bus", .data = &am335x_data, },
+ { .compatible = "ti,am4376-pruss-soc-bus", .data = &am437x_data, },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, pruss_soc_bus_of_match);