|
@@ -208,45 +208,29 @@ void irq_shutdown(struct irq_desc *desc)
|
|
{
|
|
{
|
|
desc->status |= IRQ_MASKED | IRQ_DISABLED;
|
|
desc->status |= IRQ_MASKED | IRQ_DISABLED;
|
|
desc->depth = 1;
|
|
desc->depth = 1;
|
|
- desc->irq_data.chip->irq_shutdown(&desc->irq_data);
|
|
|
|
|
|
+ if (desc->irq_data.chip->irq_shutdown)
|
|
|
|
+ desc->irq_data.chip->irq_shutdown(&desc->irq_data);
|
|
|
|
+ if (desc->irq_data.chip->irq_disable)
|
|
|
|
+ desc->irq_data.chip->irq_disable(&desc->irq_data);
|
|
|
|
+ else
|
|
|
|
+ desc->irq_data.chip->irq_mask(&desc->irq_data);
|
|
}
|
|
}
|
|
|
|
|
|
void irq_enable(struct irq_desc *desc)
|
|
void irq_enable(struct irq_desc *desc)
|
|
{
|
|
{
|
|
- desc->irq_data.chip->irq_enable(&desc->irq_data);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void irq_disable(struct irq_desc *desc)
|
|
|
|
-{
|
|
|
|
- desc->irq_data.chip->irq_disable(&desc->irq_data);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/*
|
|
|
|
- * default enable function
|
|
|
|
- */
|
|
|
|
-static void default_enable(struct irq_data *data)
|
|
|
|
-{
|
|
|
|
- struct irq_desc *desc = irq_data_to_desc(data);
|
|
|
|
-
|
|
|
|
- desc->irq_data.chip->irq_unmask(&desc->irq_data);
|
|
|
|
|
|
+ if (desc->irq_data.chip->irq_enable)
|
|
|
|
+ desc->irq_data.chip->irq_enable(&desc->irq_data);
|
|
|
|
+ else
|
|
|
|
+ desc->irq_data.chip->irq_unmask(&desc->irq_data);
|
|
desc->status &= ~IRQ_MASKED;
|
|
desc->status &= ~IRQ_MASKED;
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
- * default disable function
|
|
|
|
- */
|
|
|
|
-static void default_disable(struct irq_data *data)
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/*
|
|
|
|
- * default shutdown function
|
|
|
|
- */
|
|
|
|
-static void default_shutdown(struct irq_data *data)
|
|
|
|
|
|
+void irq_disable(struct irq_desc *desc)
|
|
{
|
|
{
|
|
- struct irq_desc *desc = irq_data_to_desc(data);
|
|
|
|
-
|
|
|
|
- desc->irq_data.chip->irq_mask(&desc->irq_data);
|
|
|
|
|
|
+ if (desc->irq_data.chip->irq_disable) {
|
|
|
|
+ desc->irq_data.chip->irq_disable(&desc->irq_data);
|
|
|
|
+ desc->status |= IRQ_MASKED;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
|
|
#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
|
|
@@ -334,10 +318,6 @@ static void compat_bus_sync_unlock(struct irq_data *data)
|
|
void irq_chip_set_defaults(struct irq_chip *chip)
|
|
void irq_chip_set_defaults(struct irq_chip *chip)
|
|
{
|
|
{
|
|
#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
|
|
#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
|
|
- /*
|
|
|
|
- * Compat fixup functions need to be before we set the
|
|
|
|
- * defaults for enable/disable/startup/shutdown
|
|
|
|
- */
|
|
|
|
if (chip->enable)
|
|
if (chip->enable)
|
|
chip->irq_enable = compat_irq_enable;
|
|
chip->irq_enable = compat_irq_enable;
|
|
if (chip->disable)
|
|
if (chip->disable)
|
|
@@ -346,31 +326,8 @@ void irq_chip_set_defaults(struct irq_chip *chip)
|
|
chip->irq_shutdown = compat_irq_shutdown;
|
|
chip->irq_shutdown = compat_irq_shutdown;
|
|
if (chip->startup)
|
|
if (chip->startup)
|
|
chip->irq_startup = compat_irq_startup;
|
|
chip->irq_startup = compat_irq_startup;
|
|
-#endif
|
|
|
|
- /*
|
|
|
|
- * The real defaults
|
|
|
|
- */
|
|
|
|
- if (!chip->irq_enable)
|
|
|
|
- chip->irq_enable = default_enable;
|
|
|
|
- if (!chip->irq_disable)
|
|
|
|
- chip->irq_disable = default_disable;
|
|
|
|
- /*
|
|
|
|
- * We use chip->irq_disable, when the user provided its own. When
|
|
|
|
- * we have default_disable set for chip->irq_disable, then we need
|
|
|
|
- * to use default_shutdown, otherwise the irq line is not
|
|
|
|
- * disabled on free_irq():
|
|
|
|
- */
|
|
|
|
- if (!chip->irq_shutdown)
|
|
|
|
- chip->irq_shutdown = chip->irq_disable != default_disable ?
|
|
|
|
- chip->irq_disable : default_shutdown;
|
|
|
|
-
|
|
|
|
-#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
|
|
|
|
if (!chip->end)
|
|
if (!chip->end)
|
|
chip->end = dummy_irq_chip.end;
|
|
chip->end = dummy_irq_chip.end;
|
|
-
|
|
|
|
- /*
|
|
|
|
- * Now fix up the remaining compat handlers
|
|
|
|
- */
|
|
|
|
if (chip->bus_lock)
|
|
if (chip->bus_lock)
|
|
chip->irq_bus_lock = compat_bus_lock;
|
|
chip->irq_bus_lock = compat_bus_lock;
|
|
if (chip->bus_sync_unlock)
|
|
if (chip->bus_sync_unlock)
|