mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (65 commits) ARM: 6826/1: Merge v6 and v7 DEBUG_LL DCC support ARM: 6838/1: etm: fix section mismatch warning ARM: 6837/1: remove unused pci_fixup_prpmc1100 ARM: 6836/1: kprobes/fix emulation of LDR/STR instruction when Rn == PC Fix the broken build for Marvell Dove platform. ARM: 6835/1: perf: ensure overflows aren't missed due to IRQ latency ARM: 6834/1: perf: reset counters on all CPUs during initialisation ARM: 6833/1: perf: add required isbs() to ARMv7 backend ARM: 6825/1: kernel/sleep.S: fix Thumb2 compilation issues ARM: 6807/1: realview: Fix secondary GIC initialisation for EB with MPCore tile arm: mach-mx3: pcm043: add write-protect and card-detect for SD1 eukrea_mbimxsd51: add SD Card detect eukrea_mbimxsd25-baseboard: add SD card detect mx3/eukrea_mbimxsd-baseboard: add SD card detect support mx3/eukrea_mbimxsd-baseboard: fix gpio request ARM: mxs/mx28evk: add mmc device ARM: mxs/mx23evk: add mmc device ARM: mxs: dynamically allocate mmc device ARM: mx51_efika: update platform data for new mfd changes mx2/iomux: Set direction for CSPI2 pins ...
This commit is contained in:
commit
85eb1513c1
101 changed files with 1196 additions and 689 deletions
|
|
@ -33,6 +33,11 @@
|
|||
|
||||
#define DRV_NAME "pata_palmld"
|
||||
|
||||
static struct gpio palmld_hdd_gpios[] = {
|
||||
{ GPIO_NR_PALMLD_IDE_PWEN, GPIOF_INIT_HIGH, "HDD Power" },
|
||||
{ GPIO_NR_PALMLD_IDE_RESET, GPIOF_INIT_LOW, "HDD Reset" },
|
||||
};
|
||||
|
||||
static struct scsi_host_template palmld_sht = {
|
||||
ATA_PIO_SHT(DRV_NAME),
|
||||
};
|
||||
|
|
@ -52,28 +57,23 @@ static __devinit int palmld_pata_probe(struct platform_device *pdev)
|
|||
|
||||
/* allocate host */
|
||||
host = ata_host_alloc(&pdev->dev, 1);
|
||||
if (!host)
|
||||
return -ENOMEM;
|
||||
if (!host) {
|
||||
ret = -ENOMEM;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
/* remap drive's physical memory address */
|
||||
mem = devm_ioremap(&pdev->dev, PALMLD_IDE_PHYS, 0x1000);
|
||||
if (!mem)
|
||||
return -ENOMEM;
|
||||
if (!mem) {
|
||||
ret = -ENOMEM;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
/* request and activate power GPIO, IRQ GPIO */
|
||||
ret = gpio_request(GPIO_NR_PALMLD_IDE_PWEN, "HDD PWR");
|
||||
ret = gpio_request_array(palmld_hdd_gpios,
|
||||
ARRAY_SIZE(palmld_hdd_gpios));
|
||||
if (ret)
|
||||
goto err1;
|
||||
ret = gpio_direction_output(GPIO_NR_PALMLD_IDE_PWEN, 1);
|
||||
if (ret)
|
||||
goto err2;
|
||||
|
||||
ret = gpio_request(GPIO_NR_PALMLD_IDE_RESET, "HDD RST");
|
||||
if (ret)
|
||||
goto err2;
|
||||
ret = gpio_direction_output(GPIO_NR_PALMLD_IDE_RESET, 0);
|
||||
if (ret)
|
||||
goto err3;
|
||||
|
||||
/* reset the drive */
|
||||
gpio_set_value(GPIO_NR_PALMLD_IDE_RESET, 0);
|
||||
|
|
@ -96,13 +96,15 @@ static __devinit int palmld_pata_probe(struct platform_device *pdev)
|
|||
ata_sff_std_ports(&ap->ioaddr);
|
||||
|
||||
/* activate host */
|
||||
return ata_host_activate(host, 0, NULL, IRQF_TRIGGER_RISING,
|
||||
ret = ata_host_activate(host, 0, NULL, IRQF_TRIGGER_RISING,
|
||||
&palmld_sht);
|
||||
if (ret)
|
||||
goto err2;
|
||||
|
||||
return ret;
|
||||
|
||||
err3:
|
||||
gpio_free(GPIO_NR_PALMLD_IDE_RESET);
|
||||
err2:
|
||||
gpio_free(GPIO_NR_PALMLD_IDE_PWEN);
|
||||
gpio_free_array(palmld_hdd_gpios, ARRAY_SIZE(palmld_hdd_gpios));
|
||||
err1:
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -116,8 +118,7 @@ static __devexit int palmld_pata_remove(struct platform_device *dev)
|
|||
/* power down the HDD */
|
||||
gpio_set_value(GPIO_NR_PALMLD_IDE_PWEN, 0);
|
||||
|
||||
gpio_free(GPIO_NR_PALMLD_IDE_RESET);
|
||||
gpio_free(GPIO_NR_PALMLD_IDE_PWEN);
|
||||
gpio_free_array(palmld_hdd_gpios, ARRAY_SIZE(palmld_hdd_gpios));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue