diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-28 17:44:38 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-28 17:44:38 -0400 |
commit | 24cc434acc2b3aaf70eba4ba20890eca5fcfa686 (patch) | |
tree | 9b5f37b2609190af53547587fb2d43404fdcecd8 /drivers/ide | |
parent | 165701d9fc0e4e2bf2784119514877484ab361c5 (diff) |
siimage: remove proc_reports_siimage()
* proc_reports_siimage() is now only called by init_chipset_siimage()
so inline it there.
* Use array instead of switch statement for reporting clock modes.
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/pci/siimage.c | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index cf8a7594ba3d..590ce7b0f9f3 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -440,30 +440,6 @@ static void sil_sata_pre_reset(ide_drive_t *drive) | |||
440 | } | 440 | } |
441 | 441 | ||
442 | /** | 442 | /** |
443 | * proc_reports_siimage - add siimage controller to proc | ||
444 | * @dev: PCI device | ||
445 | * @clocking: SCSC value | ||
446 | * @name: controller name | ||
447 | * | ||
448 | * Report the clocking mode of the controller and add it to | ||
449 | * the /proc interface layer | ||
450 | */ | ||
451 | |||
452 | static void proc_reports_siimage (struct pci_dev *dev, u8 clocking, const char *name) | ||
453 | { | ||
454 | if (!pdev_is_sata(dev)) { | ||
455 | printk(KERN_INFO "%s: BASE CLOCK ", name); | ||
456 | clocking &= 0x03; | ||
457 | switch (clocking) { | ||
458 | case 0x03: printk("DISABLED!\n"); break; | ||
459 | case 0x02: printk("== 2X PCI\n"); break; | ||
460 | case 0x01: printk("== 133\n"); break; | ||
461 | case 0x00: printk("== 100\n"); break; | ||
462 | } | ||
463 | } | ||
464 | } | ||
465 | |||
466 | /** | ||
467 | * setup_mmio_siimage - switch an SI controller into MMIO | 443 | * setup_mmio_siimage - switch an SI controller into MMIO |
468 | * @dev: PCI device we are configuring | 444 | * @dev: PCI device we are configuring |
469 | * @name: device name | 445 | * @name: device name |
@@ -585,7 +561,14 @@ static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const ch | |||
585 | writel(0x00680000, ioaddr + 0x1C8); | 561 | writel(0x00680000, ioaddr + 0x1C8); |
586 | } | 562 | } |
587 | 563 | ||
588 | proc_reports_siimage(dev, tmp >> 4, name); | 564 | /* report the clocking mode of the controller */ |
565 | if (!pdev_is_sata(dev)) { | ||
566 | static const char *clk_str[] = | ||
567 | { "== 100", "== 133", "== 2X PCI", "DISABLED!" }; | ||
568 | |||
569 | tmp >>= 4; | ||
570 | printk(KERN_INFO "%s: BASE CLOCK %s\n", name, clk_str[tmp & 3]); | ||
571 | } | ||
589 | 572 | ||
590 | return 0; | 573 | return 0; |
591 | } | 574 | } |