|
@@ -89,7 +89,7 @@ struct intel_pinctrl_context {
|
|
|
*/
|
|
*/
|
|
|
struct intel_pinctrl {
|
|
struct intel_pinctrl {
|
|
|
struct device *dev;
|
|
struct device *dev;
|
|
|
- spinlock_t lock;
|
|
|
|
|
|
|
+ raw_spinlock_t lock;
|
|
|
struct pinctrl_desc pctldesc;
|
|
struct pinctrl_desc pctldesc;
|
|
|
struct pinctrl_dev *pctldev;
|
|
struct pinctrl_dev *pctldev;
|
|
|
struct gpio_chip chip;
|
|
struct gpio_chip chip;
|
|
@@ -318,7 +318,7 @@ static int intel_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned function,
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
int i;
|
|
int i;
|
|
|
|
|
|
|
|
- spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* All pins in the groups needs to be accessible and writable
|
|
* All pins in the groups needs to be accessible and writable
|
|
@@ -326,7 +326,7 @@ static int intel_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned function,
|
|
|
*/
|
|
*/
|
|
|
for (i = 0; i < grp->npins; i++) {
|
|
for (i = 0; i < grp->npins; i++) {
|
|
|
if (!intel_pad_usable(pctrl, grp->pins[i])) {
|
|
if (!intel_pad_usable(pctrl, grp->pins[i])) {
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
return -EBUSY;
|
|
return -EBUSY;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -345,7 +345,7 @@ static int intel_pinmux_set_mux(struct pinctrl_dev *pctldev, unsigned function,
|
|
|
writel(value, padcfg0);
|
|
writel(value, padcfg0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
@@ -359,10 +359,10 @@ static int intel_gpio_request_enable(struct pinctrl_dev *pctldev,
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
u32 value;
|
|
u32 value;
|
|
|
|
|
|
|
|
- spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
if (!intel_pad_usable(pctrl, pin)) {
|
|
if (!intel_pad_usable(pctrl, pin)) {
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
return -EBUSY;
|
|
return -EBUSY;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -377,7 +377,7 @@ static int intel_gpio_request_enable(struct pinctrl_dev *pctldev,
|
|
|
value |= PADCFG0_GPIOTXDIS;
|
|
value |= PADCFG0_GPIOTXDIS;
|
|
|
writel(value, padcfg0);
|
|
writel(value, padcfg0);
|
|
|
|
|
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
@@ -391,7 +391,7 @@ static int intel_gpio_set_direction(struct pinctrl_dev *pctldev,
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
u32 value;
|
|
u32 value;
|
|
|
|
|
|
|
|
- spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0);
|
|
padcfg0 = intel_get_padcfg(pctrl, pin, PADCFG0);
|
|
|
|
|
|
|
@@ -402,7 +402,7 @@ static int intel_gpio_set_direction(struct pinctrl_dev *pctldev,
|
|
|
value &= ~PADCFG0_GPIOTXDIS;
|
|
value &= ~PADCFG0_GPIOTXDIS;
|
|
|
writel(value, padcfg0);
|
|
writel(value, padcfg0);
|
|
|
|
|
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
@@ -490,7 +490,7 @@ static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned pin,
|
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
u32 value;
|
|
u32 value;
|
|
|
|
|
|
|
|
- spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
padcfg1 = intel_get_padcfg(pctrl, pin, PADCFG1);
|
|
padcfg1 = intel_get_padcfg(pctrl, pin, PADCFG1);
|
|
|
value = readl(padcfg1);
|
|
value = readl(padcfg1);
|
|
@@ -544,7 +544,7 @@ static int intel_config_set_pull(struct intel_pinctrl *pctrl, unsigned pin,
|
|
|
if (!ret)
|
|
if (!ret)
|
|
|
writel(value, padcfg1);
|
|
writel(value, padcfg1);
|
|
|
|
|
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
return ret;
|
|
return ret;
|
|
|
}
|
|
}
|
|
@@ -611,14 +611,14 @@ static void intel_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
u32 padcfg0;
|
|
u32 padcfg0;
|
|
|
|
|
|
|
|
- spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
padcfg0 = readl(reg);
|
|
padcfg0 = readl(reg);
|
|
|
if (value)
|
|
if (value)
|
|
|
padcfg0 |= PADCFG0_GPIOTXSTATE;
|
|
padcfg0 |= PADCFG0_GPIOTXSTATE;
|
|
|
else
|
|
else
|
|
|
padcfg0 &= ~PADCFG0_GPIOTXSTATE;
|
|
padcfg0 &= ~PADCFG0_GPIOTXSTATE;
|
|
|
writel(padcfg0, reg);
|
|
writel(padcfg0, reg);
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -651,7 +651,7 @@ static void intel_gpio_irq_ack(struct irq_data *d)
|
|
|
const struct intel_community *community;
|
|
const struct intel_community *community;
|
|
|
unsigned pin = irqd_to_hwirq(d);
|
|
unsigned pin = irqd_to_hwirq(d);
|
|
|
|
|
|
|
|
- spin_lock(&pctrl->lock);
|
|
|
|
|
|
|
+ raw_spin_lock(&pctrl->lock);
|
|
|
|
|
|
|
|
community = intel_get_community(pctrl, pin);
|
|
community = intel_get_community(pctrl, pin);
|
|
|
if (community) {
|
|
if (community) {
|
|
@@ -662,7 +662,7 @@ static void intel_gpio_irq_ack(struct irq_data *d)
|
|
|
writel(BIT(gpp_offset), community->regs + GPI_IS + gpp * 4);
|
|
writel(BIT(gpp_offset), community->regs + GPI_IS + gpp * 4);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- spin_unlock(&pctrl->lock);
|
|
|
|
|
|
|
+ raw_spin_unlock(&pctrl->lock);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void intel_gpio_irq_enable(struct irq_data *d)
|
|
static void intel_gpio_irq_enable(struct irq_data *d)
|
|
@@ -673,7 +673,7 @@ static void intel_gpio_irq_enable(struct irq_data *d)
|
|
|
unsigned pin = irqd_to_hwirq(d);
|
|
unsigned pin = irqd_to_hwirq(d);
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
|
|
|
|
|
- spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
community = intel_get_community(pctrl, pin);
|
|
community = intel_get_community(pctrl, pin);
|
|
|
if (community) {
|
|
if (community) {
|
|
@@ -691,7 +691,7 @@ static void intel_gpio_irq_enable(struct irq_data *d)
|
|
|
writel(value, community->regs + community->ie_offset + gpp * 4);
|
|
writel(value, community->regs + community->ie_offset + gpp * 4);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void intel_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
|
static void intel_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
|
@@ -702,7 +702,7 @@ static void intel_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
|
|
unsigned pin = irqd_to_hwirq(d);
|
|
unsigned pin = irqd_to_hwirq(d);
|
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
|
|
|
|
|
- spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
community = intel_get_community(pctrl, pin);
|
|
community = intel_get_community(pctrl, pin);
|
|
|
if (community) {
|
|
if (community) {
|
|
@@ -721,7 +721,7 @@ static void intel_gpio_irq_mask_unmask(struct irq_data *d, bool mask)
|
|
|
writel(value, reg);
|
|
writel(value, reg);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static void intel_gpio_irq_mask(struct irq_data *d)
|
|
static void intel_gpio_irq_mask(struct irq_data *d)
|
|
@@ -757,7 +757,7 @@ static int intel_gpio_irq_type(struct irq_data *d, unsigned type)
|
|
|
return -EPERM;
|
|
return -EPERM;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_lock_irqsave(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
value = readl(reg);
|
|
value = readl(reg);
|
|
|
|
|
|
|
@@ -784,7 +784,7 @@ static int intel_gpio_irq_type(struct irq_data *d, unsigned type)
|
|
|
else if (type & IRQ_TYPE_LEVEL_MASK)
|
|
else if (type & IRQ_TYPE_LEVEL_MASK)
|
|
|
irq_set_handler_locked(d, handle_level_irq);
|
|
irq_set_handler_locked(d, handle_level_irq);
|
|
|
|
|
|
|
|
- spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
+ raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
|
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
|
}
|
|
}
|
|
@@ -995,7 +995,7 @@ int intel_pinctrl_probe(struct platform_device *pdev,
|
|
|
|
|
|
|
|
pctrl->dev = &pdev->dev;
|
|
pctrl->dev = &pdev->dev;
|
|
|
pctrl->soc = soc_data;
|
|
pctrl->soc = soc_data;
|
|
|
- spin_lock_init(&pctrl->lock);
|
|
|
|
|
|
|
+ raw_spin_lock_init(&pctrl->lock);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* Make a copy of the communities which we can use to hold pointers
|
|
* Make a copy of the communities which we can use to hold pointers
|