Commit 8e0aedc5 authored by David Woodhouse's avatar David Woodhouse

[MTD] Use proper binary multiple prefixes in pmc551 driver

Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 8f46c527
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
* *
* Notes: * Notes:
* Due to what I assume is more buggy SROM, the 64M PMC551 I * Due to what I assume is more buggy SROM, the 64M PMC551 I
* have available claims that all 4 of it's DRAM banks have 64M * have available claims that all 4 of its DRAM banks have 64MiB
* of ram configured (making a grand total of 256M onboard). * of ram configured (making a grand total of 256MiB onboard).
* This is slightly annoying since the BAR0 size reflects the * This is slightly annoying since the BAR0 size reflects the
* aperture size, not the dram size, and the V370PDC supplies no * aperture size, not the dram size, and the V370PDC supplies no
* other method for memory size discovery. This problem is * other method for memory size discovery. This problem is
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
* made the memory unusable, added a fix to code to touch up * made the memory unusable, added a fix to code to touch up
* the DRAM some. * the DRAM some.
* *
* Bugs/FIXME's: * Bugs/FIXMEs:
* * MUST fix the init function to not spin on a register * * MUST fix the init function to not spin on a register
* waiting for it to set .. this does not safely handle busted * waiting for it to set .. this does not safely handle busted
* devices that never reset the register correctly which will * devices that never reset the register correctly which will
...@@ -562,10 +562,10 @@ static u32 fixup_pmc551(struct pci_dev *dev) ...@@ -562,10 +562,10 @@ static u32 fixup_pmc551(struct pci_dev *dev)
/* /*
* Some screen fun * Some screen fun
*/ */
printk(KERN_DEBUG "pmc551: %d%c (0x%x) of %sprefetchable memory at " printk(KERN_DEBUG "pmc551: %d%sB (0x%x) of %sprefetchable memory at "
"0x%llx\n", (size < 1024) ? size : (size < 1048576) ? "0x%llx\n", (size < 1024) ? size : (size < 1048576) ?
size >> 10 : size >> 20, size >> 10 : size >> 20,
(size < 1024) ? 'B' : (size < 1048576) ? 'K' : 'M', size, (size < 1024) ? "" : (size < 1048576) ? "Ki" : "Mi", size,
((dcmd & (0x1 << 3)) == 0) ? "non-" : "", ((dcmd & (0x1 << 3)) == 0) ? "non-" : "",
(unsigned long long)pci_resource_start(dev, 0)); (unsigned long long)pci_resource_start(dev, 0));
...@@ -656,7 +656,7 @@ static int asize = 0; ...@@ -656,7 +656,7 @@ static int asize = 0;
#endif #endif
module_param(msize, int, 0); module_param(msize, int, 0);
MODULE_PARM_DESC(msize, "memory size in Megabytes [1 - 1024]"); MODULE_PARM_DESC(msize, "memory size in MiB [1 - 1024]");
module_param(asize, int, 0); module_param(asize, int, 0);
MODULE_PARM_DESC(asize, "aperture size, must be <= memsize [1-1024]"); MODULE_PARM_DESC(asize, "aperture size, must be <= memsize [1-1024]");
...@@ -799,8 +799,7 @@ static int __init init_pmc551(void) ...@@ -799,8 +799,7 @@ static int __init init_pmc551(void)
mtd->owner = THIS_MODULE; mtd->owner = THIS_MODULE;
if (add_mtd_device(mtd)) { if (add_mtd_device(mtd)) {
printk(KERN_NOTICE "pmc551: Failed to register new " printk(KERN_NOTICE "pmc551: Failed to register new device\n");
"device\n");
pci_iounmap(PCI_Device, priv->start); pci_iounmap(PCI_Device, priv->start);
kfree(mtd->priv); kfree(mtd->priv);
kfree(mtd); kfree(mtd);
...@@ -811,13 +810,13 @@ static int __init init_pmc551(void) ...@@ -811,13 +810,13 @@ static int __init init_pmc551(void)
pci_dev_get(PCI_Device); pci_dev_get(PCI_Device);
printk(KERN_NOTICE "Registered pmc551 memory device.\n"); printk(KERN_NOTICE "Registered pmc551 memory device.\n");
printk(KERN_NOTICE "Mapped %dM of memory from 0x%p to 0x%p\n", printk(KERN_NOTICE "Mapped %dMiB of memory from 0x%p to 0x%p\n",
priv->asize >> 20, priv->asize >> 20,
priv->start, priv->start + priv->asize); priv->start, priv->start + priv->asize);
printk(KERN_NOTICE "Total memory is %d%c\n", printk(KERN_NOTICE "Total memory is %d%sB\n",
(length < 1024) ? length : (length < 1024) ? length :
(length < 1048576) ? length >> 10 : length >> 20, (length < 1048576) ? length >> 10 : length >> 20,
(length < 1024) ? 'B' : (length < 1048576) ? 'K' : 'M'); (length < 1024) ? "" : (length < 1048576) ? "Ki" : "Mi");
priv->nextpmc551 = pmc551list; priv->nextpmc551 = pmc551list;
pmc551list = mtd; pmc551list = mtd;
found++; found++;
...@@ -850,7 +849,7 @@ static void __exit cleanup_pmc551(void) ...@@ -850,7 +849,7 @@ static void __exit cleanup_pmc551(void)
pmc551list = priv->nextpmc551; pmc551list = priv->nextpmc551;
if (priv->start) { if (priv->start) {
printk(KERN_DEBUG "pmc551: unmapping %dM starting at " printk(KERN_DEBUG "pmc551: unmapping %dMiB starting at "
"0x%p\n", priv->asize >> 20, priv->start); "0x%p\n", priv->asize >> 20, priv->start);
pci_iounmap(priv->dev, priv->start); pci_iounmap(priv->dev, priv->start);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment