diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/Kconfig | 15 | ||||
-rw-r--r-- | drivers/misc/ad525x_dpot.h | 2 | ||||
-rw-r--r-- | drivers/misc/carma/carma-fpga-program.c | 9 | ||||
-rw-r--r-- | drivers/misc/carma/carma-fpga.c | 9 | ||||
-rw-r--r-- | drivers/misc/eeprom/Kconfig | 2 | ||||
-rw-r--r-- | drivers/misc/pch_phub.c | 81 | ||||
-rw-r--r-- | drivers/misc/spear13xx_pcie_gadget.c | 2 |
7 files changed, 78 insertions, 42 deletions
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index d593878d66d0..5664696f2d3a 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
@@ -472,7 +472,7 @@ config BMP085 | |||
472 | module will be called bmp085. | 472 | module will be called bmp085. |
473 | 473 | ||
474 | config PCH_PHUB | 474 | config PCH_PHUB |
475 | tristate "Intel EG20T PCH / OKI SEMICONDUCTOR IOH(ML7213/ML7223) PHUB" | 475 | tristate "Intel EG20T PCH/LAPIS Semicon IOH(ML7213/ML7223/ML7831) PHUB" |
476 | depends on PCI | 476 | depends on PCI |
477 | help | 477 | help |
478 | This driver is for PCH(Platform controller Hub) PHUB(Packet Hub) of | 478 | This driver is for PCH(Platform controller Hub) PHUB(Packet Hub) of |
@@ -480,12 +480,13 @@ config PCH_PHUB | |||
480 | processor. The Topcliff has MAC address and Option ROM data in SROM. | 480 | processor. The Topcliff has MAC address and Option ROM data in SROM. |
481 | This driver can access MAC address and Option ROM data in SROM. | 481 | This driver can access MAC address and Option ROM data in SROM. |
482 | 482 | ||
483 | This driver also can be used for OKI SEMICONDUCTOR IOH(Input/ | 483 | This driver also can be used for LAPIS Semiconductor's IOH, |
484 | Output Hub), ML7213 and ML7223. | 484 | ML7213/ML7223/ML7831. |
485 | ML7213 IOH is for IVI(In-Vehicle Infotainment) use and ML7223 IOH is | 485 | ML7213 which is for IVI(In-Vehicle Infotainment) use. |
486 | for MP(Media Phone) use. | 486 | ML7223 IOH is for MP(Media Phone) use. |
487 | ML7213/ML7223 is companion chip for Intel Atom E6xx series. | 487 | ML7831 IOH is for general purpose use. |
488 | ML7213/ML7223 is completely compatible for Intel EG20T PCH. | 488 | ML7213/ML7223/ML7831 is companion chip for Intel Atom E6xx series. |
489 | ML7213/ML7223/ML7831 is completely compatible for Intel EG20T PCH. | ||
489 | 490 | ||
490 | To compile this driver as a module, choose M here: the module will | 491 | To compile this driver as a module, choose M here: the module will |
491 | be called pch_phub. | 492 | be called pch_phub. |
diff --git a/drivers/misc/ad525x_dpot.h b/drivers/misc/ad525x_dpot.h index a662f5987b68..82b2cb77ae19 100644 --- a/drivers/misc/ad525x_dpot.h +++ b/drivers/misc/ad525x_dpot.h | |||
@@ -100,7 +100,7 @@ enum dpot_devid { | |||
100 | AD5293_ID = DPOT_CONF(F_RDACS_RW | F_SPI_16BIT, BRDAC0, 10, 27), | 100 | AD5293_ID = DPOT_CONF(F_RDACS_RW | F_SPI_16BIT, BRDAC0, 10, 27), |
101 | AD7376_ID = DPOT_CONF(F_RDACS_WONLY | F_AD_APPDATA | F_SPI_8BIT, | 101 | AD7376_ID = DPOT_CONF(F_RDACS_WONLY | F_AD_APPDATA | F_SPI_8BIT, |
102 | BRDAC0, 7, 28), | 102 | BRDAC0, 7, 28), |
103 | AD8400_ID = DPOT_CONF(F_RDACS_WONLY | F_AD_APPDATA | F_SPI_8BIT, | 103 | AD8400_ID = DPOT_CONF(F_RDACS_WONLY | F_AD_APPDATA | F_SPI_16BIT, |
104 | BRDAC0, 8, 29), | 104 | BRDAC0, 8, 29), |
105 | AD8402_ID = DPOT_CONF(F_RDACS_WONLY | F_AD_APPDATA | F_SPI_16BIT, | 105 | AD8402_ID = DPOT_CONF(F_RDACS_WONLY | F_AD_APPDATA | F_SPI_16BIT, |
106 | BRDAC0 | BRDAC1, 8, 30), | 106 | BRDAC0 | BRDAC1, 8, 30), |
diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c index 7ce6065dc20e..eb5cd28bc6d8 100644 --- a/drivers/misc/carma/carma-fpga-program.c +++ b/drivers/misc/carma/carma-fpga-program.c | |||
@@ -945,8 +945,7 @@ static int fpga_of_remove(struct platform_device *op) | |||
945 | /* CTL-CPLD Version Register */ | 945 | /* CTL-CPLD Version Register */ |
946 | #define CTL_CPLD_VERSION 0x2000 | 946 | #define CTL_CPLD_VERSION 0x2000 |
947 | 947 | ||
948 | static int fpga_of_probe(struct platform_device *op, | 948 | static int fpga_of_probe(struct platform_device *op) |
949 | const struct of_device_id *match) | ||
950 | { | 949 | { |
951 | struct device_node *of_node = op->dev.of_node; | 950 | struct device_node *of_node = op->dev.of_node; |
952 | struct device *this_device; | 951 | struct device *this_device; |
@@ -1107,7 +1106,7 @@ static struct of_device_id fpga_of_match[] = { | |||
1107 | {}, | 1106 | {}, |
1108 | }; | 1107 | }; |
1109 | 1108 | ||
1110 | static struct of_platform_driver fpga_of_driver = { | 1109 | static struct platform_driver fpga_of_driver = { |
1111 | .probe = fpga_of_probe, | 1110 | .probe = fpga_of_probe, |
1112 | .remove = fpga_of_remove, | 1111 | .remove = fpga_of_remove, |
1113 | .driver = { | 1112 | .driver = { |
@@ -1124,12 +1123,12 @@ static struct of_platform_driver fpga_of_driver = { | |||
1124 | static int __init fpga_init(void) | 1123 | static int __init fpga_init(void) |
1125 | { | 1124 | { |
1126 | led_trigger_register_simple("fpga", &ledtrig_fpga); | 1125 | led_trigger_register_simple("fpga", &ledtrig_fpga); |
1127 | return of_register_platform_driver(&fpga_of_driver); | 1126 | return platform_driver_register(&fpga_of_driver); |
1128 | } | 1127 | } |
1129 | 1128 | ||
1130 | static void __exit fpga_exit(void) | 1129 | static void __exit fpga_exit(void) |
1131 | { | 1130 | { |
1132 | of_unregister_platform_driver(&fpga_of_driver); | 1131 | platform_driver_unregister(&fpga_of_driver); |
1133 | led_trigger_unregister_simple(ledtrig_fpga); | 1132 | led_trigger_unregister_simple(ledtrig_fpga); |
1134 | } | 1133 | } |
1135 | 1134 | ||
diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c index 3965821fef17..14e974b2a781 100644 --- a/drivers/misc/carma/carma-fpga.c +++ b/drivers/misc/carma/carma-fpga.c | |||
@@ -1249,8 +1249,7 @@ static bool dma_filter(struct dma_chan *chan, void *data) | |||
1249 | return true; | 1249 | return true; |
1250 | } | 1250 | } |
1251 | 1251 | ||
1252 | static int data_of_probe(struct platform_device *op, | 1252 | static int data_of_probe(struct platform_device *op) |
1253 | const struct of_device_id *match) | ||
1254 | { | 1253 | { |
1255 | struct device_node *of_node = op->dev.of_node; | 1254 | struct device_node *of_node = op->dev.of_node; |
1256 | struct device *this_device; | 1255 | struct device *this_device; |
@@ -1401,7 +1400,7 @@ static struct of_device_id data_of_match[] = { | |||
1401 | {}, | 1400 | {}, |
1402 | }; | 1401 | }; |
1403 | 1402 | ||
1404 | static struct of_platform_driver data_of_driver = { | 1403 | static struct platform_driver data_of_driver = { |
1405 | .probe = data_of_probe, | 1404 | .probe = data_of_probe, |
1406 | .remove = data_of_remove, | 1405 | .remove = data_of_remove, |
1407 | .driver = { | 1406 | .driver = { |
@@ -1417,12 +1416,12 @@ static struct of_platform_driver data_of_driver = { | |||
1417 | 1416 | ||
1418 | static int __init data_init(void) | 1417 | static int __init data_init(void) |
1419 | { | 1418 | { |
1420 | return of_register_platform_driver(&data_of_driver); | 1419 | return platform_driver_register(&data_of_driver); |
1421 | } | 1420 | } |
1422 | 1421 | ||
1423 | static void __exit data_exit(void) | 1422 | static void __exit data_exit(void) |
1424 | { | 1423 | { |
1425 | of_unregister_platform_driver(&data_of_driver); | 1424 | platform_driver_unregister(&data_of_driver); |
1426 | } | 1425 | } |
1427 | 1426 | ||
1428 | MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); | 1427 | MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); |
diff --git a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig index 26cf12ca7f50..701edf658970 100644 --- a/drivers/misc/eeprom/Kconfig +++ b/drivers/misc/eeprom/Kconfig | |||
@@ -85,7 +85,7 @@ config EEPROM_93XX46 | |||
85 | 85 | ||
86 | config EEPROM_DIGSY_MTC_CFG | 86 | config EEPROM_DIGSY_MTC_CFG |
87 | bool "DigsyMTC display configuration EEPROMs device" | 87 | bool "DigsyMTC display configuration EEPROMs device" |
88 | depends on PPC_MPC5200_GPIO && GPIOLIB && SPI_GPIO | 88 | depends on GPIO_MPC5200 && SPI_GPIO |
89 | help | 89 | help |
90 | This option enables access to display configuration EEPROMs | 90 | This option enables access to display configuration EEPROMs |
91 | on digsy_mtc board. You have to additionally select Microwire | 91 | on digsy_mtc board. You have to additionally select Microwire |
diff --git a/drivers/misc/pch_phub.c b/drivers/misc/pch_phub.c index dee33addcaeb..10fc4785dba7 100644 --- a/drivers/misc/pch_phub.c +++ b/drivers/misc/pch_phub.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2010 OKI SEMICONDUCTOR CO., LTD. | 2 | * Copyright (C) 2011 LAPIS Semiconductor Co., Ltd. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 5 | * it under the terms of the GNU General Public License as published by |
@@ -41,10 +41,10 @@ | |||
41 | #define PCH_PHUB_ROM_START_ADDR_EG20T 0x80 /* ROM data area start address offset | 41 | #define PCH_PHUB_ROM_START_ADDR_EG20T 0x80 /* ROM data area start address offset |
42 | (Intel EG20T PCH)*/ | 42 | (Intel EG20T PCH)*/ |
43 | #define PCH_PHUB_ROM_START_ADDR_ML7213 0x400 /* ROM data area start address | 43 | #define PCH_PHUB_ROM_START_ADDR_ML7213 0x400 /* ROM data area start address |
44 | offset(OKI SEMICONDUCTOR ML7213) | 44 | offset(LAPIS Semicon ML7213) |
45 | */ | 45 | */ |
46 | #define PCH_PHUB_ROM_START_ADDR_ML7223 0x400 /* ROM data area start address | 46 | #define PCH_PHUB_ROM_START_ADDR_ML7223 0x400 /* ROM data area start address |
47 | offset(OKI SEMICONDUCTOR ML7223) | 47 | offset(LAPIS Semicon ML7223) |
48 | */ | 48 | */ |
49 | 49 | ||
50 | /* MAX number of INT_REDUCE_CONTROL registers */ | 50 | /* MAX number of INT_REDUCE_CONTROL registers */ |
@@ -73,6 +73,9 @@ | |||
73 | #define PCI_DEVICE_ID_ROHM_ML7223_mPHUB 0x8012 /* for Bus-m */ | 73 | #define PCI_DEVICE_ID_ROHM_ML7223_mPHUB 0x8012 /* for Bus-m */ |
74 | #define PCI_DEVICE_ID_ROHM_ML7223_nPHUB 0x8002 /* for Bus-n */ | 74 | #define PCI_DEVICE_ID_ROHM_ML7223_nPHUB 0x8002 /* for Bus-n */ |
75 | 75 | ||
76 | /* Macros for ML7831 */ | ||
77 | #define PCI_DEVICE_ID_ROHM_ML7831_PHUB 0x8801 | ||
78 | |||
76 | /* SROM ACCESS Macro */ | 79 | /* SROM ACCESS Macro */ |
77 | #define PCH_WORD_ADDR_MASK (~((1 << 2) - 1)) | 80 | #define PCH_WORD_ADDR_MASK (~((1 << 2) - 1)) |
78 | 81 | ||
@@ -115,6 +118,7 @@ | |||
115 | * @pch_mac_start_address: MAC address area start address | 118 | * @pch_mac_start_address: MAC address area start address |
116 | * @pch_opt_rom_start_address: Option ROM start address | 119 | * @pch_opt_rom_start_address: Option ROM start address |
117 | * @ioh_type: Save IOH type | 120 | * @ioh_type: Save IOH type |
121 | * @pdev: pointer to pci device struct | ||
118 | */ | 122 | */ |
119 | struct pch_phub_reg { | 123 | struct pch_phub_reg { |
120 | u32 phub_id_reg; | 124 | u32 phub_id_reg; |
@@ -136,6 +140,7 @@ struct pch_phub_reg { | |||
136 | u32 pch_mac_start_address; | 140 | u32 pch_mac_start_address; |
137 | u32 pch_opt_rom_start_address; | 141 | u32 pch_opt_rom_start_address; |
138 | int ioh_type; | 142 | int ioh_type; |
143 | struct pci_dev *pdev; | ||
139 | }; | 144 | }; |
140 | 145 | ||
141 | /* SROM SPEC for MAC address assignment offset */ | 146 | /* SROM SPEC for MAC address assignment offset */ |
@@ -471,7 +476,7 @@ static int pch_phub_write_gbe_mac_addr(struct pch_phub_reg *chip, u8 *data) | |||
471 | int retval; | 476 | int retval; |
472 | int i; | 477 | int i; |
473 | 478 | ||
474 | if (chip->ioh_type == 1) /* EG20T */ | 479 | if ((chip->ioh_type == 1) || (chip->ioh_type == 5)) /* EG20T or ML7831*/ |
475 | retval = pch_phub_gbe_serial_rom_conf(chip); | 480 | retval = pch_phub_gbe_serial_rom_conf(chip); |
476 | else /* ML7223 */ | 481 | else /* ML7223 */ |
477 | retval = pch_phub_gbe_serial_rom_conf_mp(chip); | 482 | retval = pch_phub_gbe_serial_rom_conf_mp(chip); |
@@ -498,6 +503,7 @@ static ssize_t pch_phub_bin_read(struct file *filp, struct kobject *kobj, | |||
498 | unsigned int orom_size; | 503 | unsigned int orom_size; |
499 | int ret; | 504 | int ret; |
500 | int err; | 505 | int err; |
506 | ssize_t rom_size; | ||
501 | 507 | ||
502 | struct pch_phub_reg *chip = | 508 | struct pch_phub_reg *chip = |
503 | dev_get_drvdata(container_of(kobj, struct device, kobj)); | 509 | dev_get_drvdata(container_of(kobj, struct device, kobj)); |
@@ -509,6 +515,10 @@ static ssize_t pch_phub_bin_read(struct file *filp, struct kobject *kobj, | |||
509 | } | 515 | } |
510 | 516 | ||
511 | /* Get Rom signature */ | 517 | /* Get Rom signature */ |
518 | chip->pch_phub_extrom_base_address = pci_map_rom(chip->pdev, &rom_size); | ||
519 | if (!chip->pch_phub_extrom_base_address) | ||
520 | goto exrom_map_err; | ||
521 | |||
512 | pch_phub_read_serial_rom(chip, chip->pch_opt_rom_start_address, | 522 | pch_phub_read_serial_rom(chip, chip->pch_opt_rom_start_address, |
513 | (unsigned char *)&rom_signature); | 523 | (unsigned char *)&rom_signature); |
514 | rom_signature &= 0xff; | 524 | rom_signature &= 0xff; |
@@ -539,10 +549,13 @@ static ssize_t pch_phub_bin_read(struct file *filp, struct kobject *kobj, | |||
539 | goto return_err; | 549 | goto return_err; |
540 | } | 550 | } |
541 | return_ok: | 551 | return_ok: |
552 | pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); | ||
542 | mutex_unlock(&pch_phub_mutex); | 553 | mutex_unlock(&pch_phub_mutex); |
543 | return addr_offset; | 554 | return addr_offset; |
544 | 555 | ||
545 | return_err: | 556 | return_err: |
557 | pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); | ||
558 | exrom_map_err: | ||
546 | mutex_unlock(&pch_phub_mutex); | 559 | mutex_unlock(&pch_phub_mutex); |
547 | return_err_nomutex: | 560 | return_err_nomutex: |
548 | return err; | 561 | return err; |
@@ -555,6 +568,7 @@ static ssize_t pch_phub_bin_write(struct file *filp, struct kobject *kobj, | |||
555 | int err; | 568 | int err; |
556 | unsigned int addr_offset; | 569 | unsigned int addr_offset; |
557 | int ret; | 570 | int ret; |
571 | ssize_t rom_size; | ||
558 | struct pch_phub_reg *chip = | 572 | struct pch_phub_reg *chip = |
559 | dev_get_drvdata(container_of(kobj, struct device, kobj)); | 573 | dev_get_drvdata(container_of(kobj, struct device, kobj)); |
560 | 574 | ||
@@ -571,6 +585,12 @@ static ssize_t pch_phub_bin_write(struct file *filp, struct kobject *kobj, | |||
571 | goto return_ok; | 585 | goto return_ok; |
572 | } | 586 | } |
573 | 587 | ||
588 | chip->pch_phub_extrom_base_address = pci_map_rom(chip->pdev, &rom_size); | ||
589 | if (!chip->pch_phub_extrom_base_address) { | ||
590 | err = -ENOMEM; | ||
591 | goto exrom_map_err; | ||
592 | } | ||
593 | |||
574 | for (addr_offset = 0; addr_offset < count; addr_offset++) { | 594 | for (addr_offset = 0; addr_offset < count; addr_offset++) { |
575 | if (PCH_PHUB_OROM_SIZE < off + addr_offset) | 595 | if (PCH_PHUB_OROM_SIZE < off + addr_offset) |
576 | goto return_ok; | 596 | goto return_ok; |
@@ -585,10 +605,14 @@ static ssize_t pch_phub_bin_write(struct file *filp, struct kobject *kobj, | |||
585 | } | 605 | } |
586 | 606 | ||
587 | return_ok: | 607 | return_ok: |
608 | pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); | ||
588 | mutex_unlock(&pch_phub_mutex); | 609 | mutex_unlock(&pch_phub_mutex); |
589 | return addr_offset; | 610 | return addr_offset; |
590 | 611 | ||
591 | return_err: | 612 | return_err: |
613 | pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); | ||
614 | |||
615 | exrom_map_err: | ||
592 | mutex_unlock(&pch_phub_mutex); | 616 | mutex_unlock(&pch_phub_mutex); |
593 | return err; | 617 | return err; |
594 | } | 618 | } |
@@ -598,8 +622,14 @@ static ssize_t show_pch_mac(struct device *dev, struct device_attribute *attr, | |||
598 | { | 622 | { |
599 | u8 mac[8]; | 623 | u8 mac[8]; |
600 | struct pch_phub_reg *chip = dev_get_drvdata(dev); | 624 | struct pch_phub_reg *chip = dev_get_drvdata(dev); |
625 | ssize_t rom_size; | ||
626 | |||
627 | chip->pch_phub_extrom_base_address = pci_map_rom(chip->pdev, &rom_size); | ||
628 | if (!chip->pch_phub_extrom_base_address) | ||
629 | return -ENOMEM; | ||
601 | 630 | ||
602 | pch_phub_read_gbe_mac_addr(chip, mac); | 631 | pch_phub_read_gbe_mac_addr(chip, mac); |
632 | pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); | ||
603 | 633 | ||
604 | return sprintf(buf, "%pM\n", mac); | 634 | return sprintf(buf, "%pM\n", mac); |
605 | } | 635 | } |
@@ -608,6 +638,7 @@ static ssize_t store_pch_mac(struct device *dev, struct device_attribute *attr, | |||
608 | const char *buf, size_t count) | 638 | const char *buf, size_t count) |
609 | { | 639 | { |
610 | u8 mac[6]; | 640 | u8 mac[6]; |
641 | ssize_t rom_size; | ||
611 | struct pch_phub_reg *chip = dev_get_drvdata(dev); | 642 | struct pch_phub_reg *chip = dev_get_drvdata(dev); |
612 | 643 | ||
613 | if (count != 18) | 644 | if (count != 18) |
@@ -617,7 +648,12 @@ static ssize_t store_pch_mac(struct device *dev, struct device_attribute *attr, | |||
617 | (u32 *)&mac[0], (u32 *)&mac[1], (u32 *)&mac[2], (u32 *)&mac[3], | 648 | (u32 *)&mac[0], (u32 *)&mac[1], (u32 *)&mac[2], (u32 *)&mac[3], |
618 | (u32 *)&mac[4], (u32 *)&mac[5]); | 649 | (u32 *)&mac[4], (u32 *)&mac[5]); |
619 | 650 | ||
651 | chip->pch_phub_extrom_base_address = pci_map_rom(chip->pdev, &rom_size); | ||
652 | if (!chip->pch_phub_extrom_base_address) | ||
653 | return -ENOMEM; | ||
654 | |||
620 | pch_phub_write_gbe_mac_addr(chip, mac); | 655 | pch_phub_write_gbe_mac_addr(chip, mac); |
656 | pci_unmap_rom(chip->pdev, chip->pch_phub_extrom_base_address); | ||
621 | 657 | ||
622 | return count; | 658 | return count; |
623 | } | 659 | } |
@@ -640,7 +676,6 @@ static int __devinit pch_phub_probe(struct pci_dev *pdev, | |||
640 | int retval; | 676 | int retval; |
641 | 677 | ||
642 | int ret; | 678 | int ret; |
643 | ssize_t rom_size; | ||
644 | struct pch_phub_reg *chip; | 679 | struct pch_phub_reg *chip; |
645 | 680 | ||
646 | chip = kzalloc(sizeof(struct pch_phub_reg), GFP_KERNEL); | 681 | chip = kzalloc(sizeof(struct pch_phub_reg), GFP_KERNEL); |
@@ -677,19 +712,7 @@ static int __devinit pch_phub_probe(struct pci_dev *pdev, | |||
677 | "in pch_phub_base_address variable is %p\n", __func__, | 712 | "in pch_phub_base_address variable is %p\n", __func__, |
678 | chip->pch_phub_base_address); | 713 | chip->pch_phub_base_address); |
679 | 714 | ||
680 | if (id->driver_data != 3) { | 715 | chip->pdev = pdev; /* Save pci device struct */ |
681 | chip->pch_phub_extrom_base_address =\ | ||
682 | pci_map_rom(pdev, &rom_size); | ||
683 | if (chip->pch_phub_extrom_base_address == 0) { | ||
684 | dev_err(&pdev->dev, "%s: pci_map_rom FAILED", __func__); | ||
685 | ret = -ENOMEM; | ||
686 | goto err_pci_map; | ||
687 | } | ||
688 | dev_dbg(&pdev->dev, "%s : " | ||
689 | "pci_map_rom SUCCESS and value in " | ||
690 | "pch_phub_extrom_base_address variable is %p\n", | ||
691 | __func__, chip->pch_phub_extrom_base_address); | ||
692 | } | ||
693 | 716 | ||
694 | if (id->driver_data == 1) { /* EG20T PCH */ | 717 | if (id->driver_data == 1) { /* EG20T PCH */ |
695 | const char *board_name; | 718 | const char *board_name; |
@@ -763,6 +786,22 @@ static int __devinit pch_phub_probe(struct pci_dev *pdev, | |||
763 | chip->pch_opt_rom_start_address =\ | 786 | chip->pch_opt_rom_start_address =\ |
764 | PCH_PHUB_ROM_START_ADDR_ML7223; | 787 | PCH_PHUB_ROM_START_ADDR_ML7223; |
765 | chip->pch_mac_start_address = PCH_PHUB_MAC_START_ADDR_ML7223; | 788 | chip->pch_mac_start_address = PCH_PHUB_MAC_START_ADDR_ML7223; |
789 | } else if (id->driver_data == 5) { /* ML7831 */ | ||
790 | retval = sysfs_create_file(&pdev->dev.kobj, | ||
791 | &dev_attr_pch_mac.attr); | ||
792 | if (retval) | ||
793 | goto err_sysfs_create; | ||
794 | |||
795 | retval = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr); | ||
796 | if (retval) | ||
797 | goto exit_bin_attr; | ||
798 | |||
799 | /* set the prefech value */ | ||
800 | iowrite32(0x000affaa, chip->pch_phub_base_address + 0x14); | ||
801 | /* set the interrupt delay value */ | ||
802 | iowrite32(0x25, chip->pch_phub_base_address + 0x44); | ||
803 | chip->pch_opt_rom_start_address = PCH_PHUB_ROM_START_ADDR_EG20T; | ||
804 | chip->pch_mac_start_address = PCH_PHUB_MAC_START_ADDR_EG20T; | ||
766 | } | 805 | } |
767 | 806 | ||
768 | chip->ioh_type = id->driver_data; | 807 | chip->ioh_type = id->driver_data; |
@@ -773,8 +812,6 @@ exit_bin_attr: | |||
773 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_pch_mac.attr); | 812 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_pch_mac.attr); |
774 | 813 | ||
775 | err_sysfs_create: | 814 | err_sysfs_create: |
776 | pci_unmap_rom(pdev, chip->pch_phub_extrom_base_address); | ||
777 | err_pci_map: | ||
778 | pci_iounmap(pdev, chip->pch_phub_base_address); | 815 | pci_iounmap(pdev, chip->pch_phub_base_address); |
779 | err_pci_iomap: | 816 | err_pci_iomap: |
780 | pci_release_regions(pdev); | 817 | pci_release_regions(pdev); |
@@ -792,7 +829,6 @@ static void __devexit pch_phub_remove(struct pci_dev *pdev) | |||
792 | 829 | ||
793 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_pch_mac.attr); | 830 | sysfs_remove_file(&pdev->dev.kobj, &dev_attr_pch_mac.attr); |
794 | sysfs_remove_bin_file(&pdev->dev.kobj, &pch_bin_attr); | 831 | sysfs_remove_bin_file(&pdev->dev.kobj, &pch_bin_attr); |
795 | pci_unmap_rom(pdev, chip->pch_phub_extrom_base_address); | ||
796 | pci_iounmap(pdev, chip->pch_phub_base_address); | 832 | pci_iounmap(pdev, chip->pch_phub_base_address); |
797 | pci_release_regions(pdev); | 833 | pci_release_regions(pdev); |
798 | pci_disable_device(pdev); | 834 | pci_disable_device(pdev); |
@@ -847,6 +883,7 @@ static struct pci_device_id pch_phub_pcidev_id[] = { | |||
847 | { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7213_PHUB), 2, }, | 883 | { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7213_PHUB), 2, }, |
848 | { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7223_mPHUB), 3, }, | 884 | { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7223_mPHUB), 3, }, |
849 | { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7223_nPHUB), 4, }, | 885 | { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7223_nPHUB), 4, }, |
886 | { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ROHM_ML7831_PHUB), 5, }, | ||
850 | { } | 887 | { } |
851 | }; | 888 | }; |
852 | MODULE_DEVICE_TABLE(pci, pch_phub_pcidev_id); | 889 | MODULE_DEVICE_TABLE(pci, pch_phub_pcidev_id); |
@@ -873,5 +910,5 @@ static void __exit pch_phub_pci_exit(void) | |||
873 | module_init(pch_phub_pci_init); | 910 | module_init(pch_phub_pci_init); |
874 | module_exit(pch_phub_pci_exit); | 911 | module_exit(pch_phub_pci_exit); |
875 | 912 | ||
876 | MODULE_DESCRIPTION("Intel EG20T PCH/OKI SEMICONDUCTOR IOH(ML7213/ML7223) PHUB"); | 913 | MODULE_DESCRIPTION("Intel EG20T PCH/LAPIS Semiconductor IOH(ML7213/ML7223) PHUB"); |
877 | MODULE_LICENSE("GPL"); | 914 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c index cfbddbef11de..43d073bc1d9c 100644 --- a/drivers/misc/spear13xx_pcie_gadget.c +++ b/drivers/misc/spear13xx_pcie_gadget.c | |||
@@ -903,6 +903,6 @@ static void __exit spear_pcie_gadget_exit(void) | |||
903 | } | 903 | } |
904 | module_exit(spear_pcie_gadget_exit); | 904 | module_exit(spear_pcie_gadget_exit); |
905 | 905 | ||
906 | MODULE_ALIAS("pcie-gadget-spear"); | 906 | MODULE_ALIAS("platform:pcie-gadget-spear"); |
907 | MODULE_AUTHOR("Pratyush Anand"); | 907 | MODULE_AUTHOR("Pratyush Anand"); |
908 | MODULE_LICENSE("GPL"); | 908 | MODULE_LICENSE("GPL"); |