|
@@ -810,6 +810,7 @@ static const struct pinconf_ops pcs_pinconf_ops = {
|
|
static int pcs_add_pin(struct pcs_device *pcs, unsigned offset,
|
|
static int pcs_add_pin(struct pcs_device *pcs, unsigned offset,
|
|
unsigned pin_pos)
|
|
unsigned pin_pos)
|
|
{
|
|
{
|
|
|
|
+ struct pcs_soc_data *pcs_soc = &pcs->socdata;
|
|
struct pinctrl_pin_desc *pin;
|
|
struct pinctrl_pin_desc *pin;
|
|
struct pcs_name *pn;
|
|
struct pcs_name *pn;
|
|
int i;
|
|
int i;
|
|
@@ -821,6 +822,18 @@ static int pcs_add_pin(struct pcs_device *pcs, unsigned offset,
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (pcs_soc->irq_enable_mask) {
|
|
|
|
+ unsigned val;
|
|
|
|
+
|
|
|
|
+ val = pcs->read(pcs->base + offset);
|
|
|
|
+ if (val & pcs_soc->irq_enable_mask) {
|
|
|
|
+ dev_dbg(pcs->dev, "irq enabled at boot for pin at %lx (%x), clearing\n",
|
|
|
|
+ (unsigned long)pcs->res->start + offset, val);
|
|
|
|
+ val &= ~pcs_soc->irq_enable_mask;
|
|
|
|
+ pcs->write(val, pcs->base + offset);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
pin = &pcs->pins.pa[i];
|
|
pin = &pcs->pins.pa[i];
|
|
pn = &pcs->names[i];
|
|
pn = &pcs->names[i];
|
|
sprintf(pn->name, "%lx.%d",
|
|
sprintf(pn->name, "%lx.%d",
|