aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/Kconfig2
-rw-r--r--drivers/ata/pata_of_platform.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 5987e0ba8c2d..c6ef9d0cf370 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -820,7 +820,7 @@ config PATA_PLATFORM
820 820
821config PATA_OF_PLATFORM 821config PATA_OF_PLATFORM
822 tristate "OpenFirmware platform device PATA support" 822 tristate "OpenFirmware platform device PATA support"
823 depends on PATA_PLATFORM && PPC_OF 823 depends on PATA_PLATFORM && OF
824 help 824 help
825 This option enables support for generic directly connected ATA 825 This option enables support for generic directly connected ATA
826 devices commonly found on embedded systems with OpenFirmware 826 devices commonly found on embedded systems with OpenFirmware
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index f3054009bd25..a72ab0dde4e5 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -11,6 +11,8 @@
11 11
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/of_address.h>
15#include <linux/of_irq.h>
14#include <linux/of_platform.h> 16#include <linux/of_platform.h>
15#include <linux/ata_platform.h> 17#include <linux/ata_platform.h>
16 18
@@ -57,11 +59,11 @@ static int __devinit pata_of_platform_probe(struct platform_device *ofdev)
57 59
58 prop = of_get_property(dn, "reg-shift", NULL); 60 prop = of_get_property(dn, "reg-shift", NULL);
59 if (prop) 61 if (prop)
60 reg_shift = *prop; 62 reg_shift = be32_to_cpup(prop);
61 63
62 prop = of_get_property(dn, "pio-mode", NULL); 64 prop = of_get_property(dn, "pio-mode", NULL);
63 if (prop) { 65 if (prop) {
64 pio_mode = *prop; 66 pio_mode = be32_to_cpup(prop);
65 if (pio_mode > 6) { 67 if (pio_mode > 6) {
66 dev_err(&ofdev->dev, "invalid pio-mode\n"); 68 dev_err(&ofdev->dev, "invalid pio-mode\n");
67 return -EINVAL; 69 return -EINVAL;