ARM: 5636/1: Move vendor enum to AMBA include
authorLinus Walleij <linus.walleij@stericsson.com>
Tue, 4 Aug 2009 00:01:02 +0000 (01:01 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 12 Sep 2009 10:51:14 +0000 (11:51 +0100)
This moves the primecell vendor enum definition inside vic.c
out to linux/amba/bus.h where it belongs and replace any
occurances of specific vendor ID:s with the respective enums
instead.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/common/vic.c
drivers/mmc/host/mmci.c
include/linux/amba/bus.h

index bc1f9ad61ff69e3722f3c718cdd09694c0cbbf2b..920ced0b73c5b3fc042d398e2ef0b0b3b03067fa 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/list.h>
 #include <linux/io.h>
 #include <linux/sysdev.h>
+#include <linux/amba/bus.h>
 
 #include <asm/mach/irq.h>
 #include <asm/hardware/vic.h>
@@ -272,11 +273,6 @@ static struct irq_chip vic_chip = {
 static void vik_init_st(void __iomem *base, unsigned int irq_start,
                         u32 vic_sources);
 
-enum vic_vendor {
-       VENDOR_ARM = 0x41,
-       VENDOR_ST = 0x80,
-};
-
 /**
  * vic_init - initialise a vectored interrupt controller
  * @base: iomem base address
@@ -289,7 +285,7 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
 {
        unsigned int i;
        u32 cellid = 0;
-       enum vic_vendor vendor;
+       enum amba_vendor vendor;
 
        /* Identify which VIC cell this one is, by reading the ID */
        for (i = 0; i < 4; i++) {
@@ -301,13 +297,13 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
               base, cellid, vendor);
 
        switch(vendor) {
-       case VENDOR_ST:
+       case AMBA_VENDOR_ST:
                vik_init_st(base, irq_start, vic_sources);
                return;
        default:
                printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n");
                /* fall through */
-       case VENDOR_ARM:
+       case AMBA_VENDOR_ARM:
                break;
        }
 
index e1aa8471ab1c31ca31a0d7ad48bee0eb5187a46c..d78b1e460d7d7879d09e9f5bd9db65bf4fd7ef95 100644 (file)
@@ -430,7 +430,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                                clk = 255;
                        host->cclk = host->mclk / (2 * (clk + 1));
                }
-               if (host->hw_designer == 0x80)
+               if (host->hw_designer == AMBA_VENDOR_ST)
                        clk |= MCI_FCEN; /* Bug fix in ST IP block */
                clk |= MCI_CLK_ENABLE;
        }
@@ -443,7 +443,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                break;
        case MMC_POWER_UP:
                /* The ST version does not have this, fall through to POWER_ON */
-               if (host->hw_designer != 0x80) {
+               if (host->hw_designer != AMBA_VENDOR_ST) {
                        pwr |= MCI_PWR_UP;
                        break;
                }
@@ -453,7 +453,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
        }
 
        if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) {
-               if (host->hw_designer != 0x80)
+               if (host->hw_designer != AMBA_VENDOR_ST)
                        pwr |= MCI_ROD;
                else {
                        /*
index 9b93cafa82a0db78fba046a2e8e8d768707bbec2..ab94335b4bb9e55d661df26a7aca0a8d4b44c86d 100644 (file)
@@ -36,6 +36,11 @@ struct amba_driver {
        struct amba_id          *id_table;
 };
 
+enum amba_vendor {
+       AMBA_VENDOR_ARM = 0x41,
+       AMBA_VENDOR_ST = 0x80,
+};
+
 #define amba_get_drvdata(d)    dev_get_drvdata(&d->dev)
 #define amba_set_drvdata(d,p)  dev_set_drvdata(&d->dev, p)