diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2009-08-03 20:01:02 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-12 06:51:14 -0400 |
commit | f17a1f06d2fa93f4825be572622eb02c4894db4e (patch) | |
tree | a9c179d0a49bbb67db01be55d03a9c1dc966eb27 | |
parent | 701038144945ef98c5817f43079952fa38c35999 (diff) |
ARM: 5636/1: Move vendor enum to AMBA include
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>
-rw-r--r-- | arch/arm/common/vic.c | 12 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.c | 6 | ||||
-rw-r--r-- | include/linux/amba/bus.h | 5 |
3 files changed, 12 insertions, 11 deletions
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index bc1f9ad61ff6..920ced0b73c5 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/sysdev.h> | 24 | #include <linux/sysdev.h> |
25 | #include <linux/amba/bus.h> | ||
25 | 26 | ||
26 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
27 | #include <asm/hardware/vic.h> | 28 | #include <asm/hardware/vic.h> |
@@ -272,11 +273,6 @@ static struct irq_chip vic_chip = { | |||
272 | static void vik_init_st(void __iomem *base, unsigned int irq_start, | 273 | static void vik_init_st(void __iomem *base, unsigned int irq_start, |
273 | u32 vic_sources); | 274 | u32 vic_sources); |
274 | 275 | ||
275 | enum vic_vendor { | ||
276 | VENDOR_ARM = 0x41, | ||
277 | VENDOR_ST = 0x80, | ||
278 | }; | ||
279 | |||
280 | /** | 276 | /** |
281 | * vic_init - initialise a vectored interrupt controller | 277 | * vic_init - initialise a vectored interrupt controller |
282 | * @base: iomem base address | 278 | * @base: iomem base address |
@@ -289,7 +285,7 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
289 | { | 285 | { |
290 | unsigned int i; | 286 | unsigned int i; |
291 | u32 cellid = 0; | 287 | u32 cellid = 0; |
292 | enum vic_vendor vendor; | 288 | enum amba_vendor vendor; |
293 | 289 | ||
294 | /* Identify which VIC cell this one is, by reading the ID */ | 290 | /* Identify which VIC cell this one is, by reading the ID */ |
295 | for (i = 0; i < 4; i++) { | 291 | for (i = 0; i < 4; i++) { |
@@ -301,13 +297,13 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
301 | base, cellid, vendor); | 297 | base, cellid, vendor); |
302 | 298 | ||
303 | switch(vendor) { | 299 | switch(vendor) { |
304 | case VENDOR_ST: | 300 | case AMBA_VENDOR_ST: |
305 | vik_init_st(base, irq_start, vic_sources); | 301 | vik_init_st(base, irq_start, vic_sources); |
306 | return; | 302 | return; |
307 | default: | 303 | default: |
308 | printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n"); | 304 | printk(KERN_WARNING "VIC: unknown vendor, continuing anyways\n"); |
309 | /* fall through */ | 305 | /* fall through */ |
310 | case VENDOR_ARM: | 306 | case AMBA_VENDOR_ARM: |
311 | break; | 307 | break; |
312 | } | 308 | } |
313 | 309 | ||
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index e1aa8471ab1c..d78b1e460d7d 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -430,7 +430,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
430 | clk = 255; | 430 | clk = 255; |
431 | host->cclk = host->mclk / (2 * (clk + 1)); | 431 | host->cclk = host->mclk / (2 * (clk + 1)); |
432 | } | 432 | } |
433 | if (host->hw_designer == 0x80) | 433 | if (host->hw_designer == AMBA_VENDOR_ST) |
434 | clk |= MCI_FCEN; /* Bug fix in ST IP block */ | 434 | clk |= MCI_FCEN; /* Bug fix in ST IP block */ |
435 | clk |= MCI_CLK_ENABLE; | 435 | clk |= MCI_CLK_ENABLE; |
436 | } | 436 | } |
@@ -443,7 +443,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
443 | break; | 443 | break; |
444 | case MMC_POWER_UP: | 444 | case MMC_POWER_UP: |
445 | /* The ST version does not have this, fall through to POWER_ON */ | 445 | /* The ST version does not have this, fall through to POWER_ON */ |
446 | if (host->hw_designer != 0x80) { | 446 | if (host->hw_designer != AMBA_VENDOR_ST) { |
447 | pwr |= MCI_PWR_UP; | 447 | pwr |= MCI_PWR_UP; |
448 | break; | 448 | break; |
449 | } | 449 | } |
@@ -453,7 +453,7 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
453 | } | 453 | } |
454 | 454 | ||
455 | if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) { | 455 | if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) { |
456 | if (host->hw_designer != 0x80) | 456 | if (host->hw_designer != AMBA_VENDOR_ST) |
457 | pwr |= MCI_ROD; | 457 | pwr |= MCI_ROD; |
458 | else { | 458 | else { |
459 | /* | 459 | /* |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index 9b93cafa82a0..ab94335b4bb9 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
@@ -36,6 +36,11 @@ struct amba_driver { | |||
36 | struct amba_id *id_table; | 36 | struct amba_id *id_table; |
37 | }; | 37 | }; |
38 | 38 | ||
39 | enum amba_vendor { | ||
40 | AMBA_VENDOR_ARM = 0x41, | ||
41 | AMBA_VENDOR_ST = 0x80, | ||
42 | }; | ||
43 | |||
39 | #define amba_get_drvdata(d) dev_get_drvdata(&d->dev) | 44 | #define amba_get_drvdata(d) dev_get_drvdata(&d->dev) |
40 | #define amba_set_drvdata(d,p) dev_set_drvdata(&d->dev, p) | 45 | #define amba_set_drvdata(d,p) dev_set_drvdata(&d->dev, p) |
41 | 46 | ||