]> err.no Git - linux-2.6/blobdiff - arch/ppc/platforms/katana.c
[PATCH] ppc32: add 440GX erratum 440_43 workaround
[linux-2.6] / arch / ppc / platforms / katana.c
index beb6171414569b6ef6586cf1e4a2c003124905b4..ad21280e892095abd5fa6759b86bcf5cc4c03a4a 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * arch/ppc/platforms/katana.c
- *
  * Board setup routines for the Artesyn Katana cPCI boards.
  *
  * Author: Tim Montgomery <timm@artesyncp.com>
@@ -43,6 +41,7 @@
 #include <asm/ppcboot.h>
 #include <asm/mv64x60.h>
 #include <platforms/katana.h>
+#include <asm/machdep.h>
 
 static struct mv64x60_handle   bh;
 static katana_id_t             katana_id;
@@ -521,7 +520,7 @@ katana_fixup_resources(struct pci_dev *dev)
 {
        u16     v16;
 
-       pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, L1_CACHE_LINE_SIZE>>2);
+       pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, L1_CACHE_BYTES>>2);
 
        pci_read_config_word(dev, PCI_COMMAND, &v16);
        v16 |= PCI_COMMAND_INVALIDATE | PCI_COMMAND_FAST_BACK;
@@ -597,7 +596,7 @@ katana_fixup_mv64xxx_pdata(struct platform_device *pdev)
 }
 #endif
 
-static int __init
+static int
 katana_platform_notify(struct device *dev)
 {
        static struct {
@@ -663,12 +662,11 @@ katana_setup_mtd(void)
 
        ptbl_entries = (size >= (64*MB)) ? 6 : 4;
 
-       if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition),
+       if ((ptbl = kcalloc(ptbl_entries, sizeof(struct mtd_partition),
                        GFP_KERNEL)) == NULL) {
                printk(KERN_WARNING "Can't alloc MTD partition table\n");
                return -ENOMEM;
        }
-       memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition));
 
        ptbl[0].name = "Monitor";
        ptbl[0].size = KATANA_MTD_MONITOR_SIZE;