~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/ata/pata_hpt37x.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *      Look into engine reset on timeout errors. Should not be required.
15
15
 */
16
16
 
 
17
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
18
 
17
19
#include <linux/kernel.h>
18
20
#include <linux/module.h>
19
21
#include <linux/pci.h>
24
26
#include <linux/libata.h>
25
27
 
26
28
#define DRV_NAME        "pata_hpt37x"
27
 
#define DRV_VERSION     "0.6.22"
 
29
#define DRV_VERSION     "0.6.23"
28
30
 
29
31
struct hpt_clock {
30
32
        u8      xfer_speed;
229
231
 
230
232
        while (list[i] != NULL) {
231
233
                if (!strcmp(list[i], model_num)) {
232
 
                        pr_warning(DRV_NAME ": %s is not supported for %s.\n",
233
 
                                   modestr, list[i]);
 
234
                        pr_warn("%s is not supported for %s\n",
 
235
                                modestr, list[i]);
234
236
                        return 1;
235
237
                }
236
238
                i++;
863
865
                        chip_table = &hpt372;
864
866
                        break;
865
867
                default:
866
 
                        pr_err(DRV_NAME ": Unknown HPT366 subtype, "
867
 
                               "please report (%d).\n", rev);
 
868
                        pr_err("Unknown HPT366 subtype, please report (%d)\n",
 
869
                               rev);
868
870
                        return -ENODEV;
869
871
                }
870
872
                break;
904
906
                        *ppi = &info_hpt374_fn1;
905
907
                break;
906
908
        default:
907
 
                pr_err(DRV_NAME ": PCI table is bogus, please report (%d).\n",
908
 
                       dev->device);
 
909
                pr_err("PCI table is bogus, please report (%d)\n", dev->device);
909
910
                return -ENODEV;
910
911
        }
911
912
        /* Ok so this is a chip we support */
953
954
                u8 sr;
954
955
                u32 total = 0;
955
956
 
956
 
                pr_warning(DRV_NAME ": BIOS has not set timing clocks.\n");
 
957
                pr_warn("BIOS has not set timing clocks\n");
957
958
 
958
959
                /* This is the process the HPT371 BIOS is reported to use */
959
960
                for (i = 0; i < 128; i++) {
1009
1010
                                               (f_high << 16) | f_low | 0x100);
1010
1011
                }
1011
1012
                if (adjust == 8) {
1012
 
                        pr_err(DRV_NAME ": DPLL did not stabilize!\n");
 
1013
                        pr_err("DPLL did not stabilize!\n");
1013
1014
                        return -ENODEV;
1014
1015
                }
1015
1016
                if (dpll == 3)
1017
1018
                else
1018
1019
                        private_data = (void *)hpt37x_timings_50;
1019
1020
 
1020
 
                pr_info(DRV_NAME ": bus clock %dMHz, using %dMHz DPLL.\n",
 
1021
                pr_info("bus clock %dMHz, using %dMHz DPLL\n",
1021
1022
                        MHz[clock_slot], MHz[dpll]);
1022
1023
        } else {
1023
1024
                private_data = (void *)chip_table->clocks[clock_slot];
1032
1033
                if (clock_slot < 2 && ppi[0] == &info_hpt370a)
1033
1034
                        ppi[0] = &info_hpt370a_33;
1034
1035
 
1035
 
                pr_info(DRV_NAME ": %s using %dMHz bus clock.\n",
 
1036
                pr_info("%s using %dMHz bus clock\n",
1036
1037
                        chip_table->name, MHz[clock_slot]);
1037
1038
        }
1038
1039