[POWERPC] pasemi: Broaden specific references to 1682M
authorOlof Johansson <olof@lixom.net>
Mon, 5 Nov 2007 02:57:45 +0000 (20:57 -0600)
committerOlof Johansson <olof@lixom.net>
Fri, 30 Nov 2007 04:30:47 +0000 (22:30 -0600)
There will be more product numbers in the future than just PA6T-1682M,
but they will share much of the features. Remove some of the explicit
references and compatibility checks with 1682M, and replace most of them
with the more generic term "PWRficient".

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Doug Thompson <dougthompson@xmission.com>
arch/powerpc/platforms/pasemi/Kconfig
arch/powerpc/platforms/pasemi/cpufreq.c
arch/powerpc/platforms/pasemi/gpio_mdio.c
arch/powerpc/platforms/pasemi/setup.c
drivers/char/hw_random/Kconfig
drivers/char/hw_random/pasemi-rng.c
drivers/edac/pasemi_edac.c

index 735e1536cbfc15dc93a01d517d55245190694ab6..2f4dd6e4aac112b44d57cdbbcad734c4adac901e 100644 (file)
@@ -17,7 +17,7 @@ config PPC_PASEMI_IOMMU
        bool "PA Semi IOMMU support"
        depends on PPC_PASEMI
        help
-         IOMMU support for PA6T-1682M
+         IOMMU support for PA Semi PWRficient
 
 config PPC_PASEMI_IOMMU_DMA_FORCE
        bool "Force DMA engine to use IOMMU"
index 1cfb8b0c8fecd512f6b26564138a9df52b148c17..8caa1667cf34db5f572f1c1286110daa63177447 100644 (file)
@@ -147,7 +147,10 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
        if (!cpu)
                goto out;
 
-       dn = of_find_compatible_node(NULL, "sdc", "1682m-sdc");
+       dn = of_find_compatible_node(NULL, NULL, "1682m-sdc");
+       if (!dn)
+               dn = of_find_compatible_node(NULL, NULL,
+                                            "pasemi,pwrficient-sdc");
        if (!dn)
                goto out;
        err = of_address_to_resource(dn, 0, &res);
@@ -160,7 +163,10 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy)
                goto out;
        }
 
-       dn = of_find_compatible_node(NULL, "gizmo", "1682m-gizmo");
+       dn = of_find_compatible_node(NULL, NULL, "1682m-gizmo");
+       if (!dn)
+               dn = of_find_compatible_node(NULL, NULL,
+                                            "pasemi,pwrficient-gizmo");
        if (!dn) {
                err = -ENODEV;
                goto out_unmap_sdcasr;
@@ -292,7 +298,8 @@ static struct cpufreq_driver pas_cpufreq_driver = {
 
 static int __init pas_cpufreq_init(void)
 {
-       if (!machine_is_compatible("PA6T-1682M"))
+       if (!machine_is_compatible("PA6T-1682M") &&
+           !machine_is_compatible("pasemi,pwrficient"))
                return -ENODEV;
 
        return cpufreq_register_driver(&pas_cpufreq_driver);
index 95d0c78cf634cc40e68dcf1f8bba29128213d9d7..b0298045df7e4f402de2c30809462b4d10dce237 100644 (file)
@@ -333,7 +333,10 @@ int gpio_mdio_init(void)
 {
        struct device_node *np;
 
-       np = of_find_compatible_node(NULL, "gpio", "1682m-gpio");
+       np = of_find_compatible_node(NULL, NULL, "1682m-gpio");
+       if (!np)
+               np = of_find_compatible_node(NULL, NULL,
+                                            "pasemi,pwrficient-gpio");
        if (!np)
                return -ENODEV;
        gpio_regs = of_iomap(np, 0);
index 3d62060498b4256151a3e63aa28e94350552fcec..bd85853bc9dabccd05c5d7a0076dce56abbafd55 100644 (file)
@@ -362,8 +362,12 @@ static inline void pasemi_pcmcia_init(void)
 
 
 static struct of_device_id pasemi_bus_ids[] = {
+       /* Unfortunately needed for legacy firmwares */
        { .type = "localbus", },
        { .type = "sdc", },
+       /* These are the proper entries, which newer firmware uses */
+       { .compatible = "pasemi,localbus", },
+       { .compatible = "pasemi,sdc", },
        {},
 };
 
@@ -389,7 +393,8 @@ static int __init pas_probe(void)
 {
        unsigned long root = of_get_flat_dt_root();
 
-       if (!of_flat_dt_is_compatible(root, "PA6T-1682M"))
+       if (!of_flat_dt_is_compatible(root, "PA6T-1682M") &&
+           !of_flat_dt_is_compatible(root, "pasemi,pwrficient"))
                return 0;
 
        hpte_init_native();
@@ -400,7 +405,7 @@ static int __init pas_probe(void)
 }
 
 define_machine(pasemi) {
-       .name                   = "PA Semi PA6T-1682M",
+       .name                   = "PA Semi PWRficient",
        .probe                  = pas_probe,
        .setup_arch             = pas_setup_arch,
        .init_early             = pas_init_early,
index 2d7cd486e025b45015868f2a5e51f61f36e48ed0..6bbd4fa50f3b87458a56dbc155288f1e21b5a64d 100644 (file)
@@ -98,7 +98,7 @@ config HW_RANDOM_PASEMI
        default HW_RANDOM
        ---help---
          This driver provides kernel-side support for the Random Number
-         Generator hardware found on PA6T-1682M processor.
+         Generator hardware found on PA Semi PWRficient SoCs.
 
          To compile this driver as a module, choose M here: the
          module will be called pasemi-rng.
index fa6040b6c8f2a4f0483d830aa97abe48ae2f7f60..24ae3073991fee365fe0533863adb2e097dc8b97 100644 (file)
@@ -126,10 +126,9 @@ static int __devexit rng_remove(struct of_device *dev)
 }
 
 static struct of_device_id rng_match[] = {
-       {
-               .compatible      = "1682m-rng",
-       },
-       {},
+       { .compatible      = "1682m-rng", },
+       { .compatible      = "pasemi,pwrficient-rng", },
+       { },
 };
 
 static struct of_platform_driver rng_driver = {
index 9007d0677220cf3aef8a524608d345452820ba6b..90320917be2875a6a0fc77361fd59e254f7670f6 100644 (file)
@@ -225,7 +225,7 @@ static int __devinit pasemi_edac_probe(struct pci_dev *pdev,
                EDAC_FLAG_NONE;
        mci->mod_name = MODULE_NAME;
        mci->dev_name = pci_name(pdev);
-       mci->ctl_name = "pasemi,1682m-mc";
+       mci->ctl_name = "pasemi,pwrficient-mc";
        mci->edac_check = pasemi_edac_check;
        mci->ctl_page_to_phys = NULL;
        pci_read_config_dword(pdev, MCCFG_SCRUB, &scrub);
@@ -297,4 +297,4 @@ module_exit(pasemi_edac_exit);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Egor Martovetsky <egor@pasemi.com>");
-MODULE_DESCRIPTION("MC support for PA Semi PA6T-1682M memory controller");
+MODULE_DESCRIPTION("MC support for PA Semi PWRficient memory controller");