diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2010-02-24 11:40:21 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:53:43 -0500 |
commit | 11b897cf84c37e6522db914793677e933ef311fb (patch) | |
tree | b9d69cea86b2c1673f30332ff9b3944dc00bfc9b | |
parent | b9b37787d24cca9fbd63f767663e9439fa69aa22 (diff) |
MIPS: Alchemy: use 36bit addresses for PCMCIA resources.
On Alchemy the PCMCIA area lies at the end of the chips 36bit system bus
area. Currently, addresses at the far end of the 32bit area are assumed
to belong to the PCMCIA area and fixed up to the real 36bit address before
being passed to ioremap().
A previous commit enabled 64 bit physical size for the resource datatype on
Alchemy and this allows to use the correct 36bit addresses when registering
the PCMCIA sockets.
This patch removes the 32-to-36bit address fixup and registers the Alchemy
demo board pcmcia socket with the correct 36bit physical addresses.
Tested on DB1200, with a CF card (ide-cs driver) and a 3c589 PCMCIA ethernet
card.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Cc: Manuel Lauss <manuel.lauss@gmail.com>
Patchwork: http://patchwork.linux-mips.org/patch/994/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/alchemy/common/setup.c | 32 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/db1200/platform.c | 24 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/db1x00/platform.c | 24 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1100/platform.c | 12 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1200/platform.c | 24 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1500/platform.c | 12 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/pb1550/platform.c | 24 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/platform.c | 34 | ||||
-rw-r--r-- | arch/mips/alchemy/devboards/platform.h | 12 | ||||
-rw-r--r-- | arch/mips/alchemy/xxs1500/platform.c | 18 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/au1000.h | 14 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-au1x00/ioremap.h | 2 | ||||
-rw-r--r-- | drivers/pcmcia/au1000_generic.c | 10 | ||||
-rw-r--r-- | drivers/pcmcia/au1000_generic.h | 6 | ||||
-rw-r--r-- | drivers/pcmcia/db1xxx_ss.c | 25 | ||||
-rw-r--r-- | drivers/pcmcia/xxs1500_ss.c | 27 |
16 files changed, 123 insertions, 177 deletions
diff --git a/arch/mips/alchemy/common/setup.c b/arch/mips/alchemy/common/setup.c index 193ba166affd..561e5da2658b 100644 --- a/arch/mips/alchemy/common/setup.c +++ b/arch/mips/alchemy/common/setup.c | |||
@@ -69,38 +69,20 @@ void __init plat_mem_setup(void) | |||
69 | iomem_resource.end = IOMEM_RESOURCE_END; | 69 | iomem_resource.end = IOMEM_RESOURCE_END; |
70 | } | 70 | } |
71 | 71 | ||
72 | #if defined(CONFIG_64BIT_PHYS_ADDR) | 72 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_PCI) |
73 | /* This routine should be valid for all Au1x based boards */ | 73 | /* This routine should be valid for all Au1x based boards */ |
74 | phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) | 74 | phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) |
75 | { | 75 | { |
76 | u32 start = (u32)Au1500_PCI_MEM_START; | ||
77 | u32 end = (u32)Au1500_PCI_MEM_END; | ||
78 | |||
76 | /* Don't fixup 36-bit addresses */ | 79 | /* Don't fixup 36-bit addresses */ |
77 | if ((phys_addr >> 32) != 0) | 80 | if ((phys_addr >> 32) != 0) |
78 | return phys_addr; | 81 | return phys_addr; |
79 | 82 | ||
80 | #ifdef CONFIG_PCI | 83 | /* Check for PCI memory window */ |
81 | { | 84 | if (phys_addr >= start && (phys_addr + size - 1) <= end) |
82 | u32 start = (u32)Au1500_PCI_MEM_START; | 85 | return (phys_t)((phys_addr - start) + Au1500_PCI_MEM_START); |
83 | u32 end = (u32)Au1500_PCI_MEM_END; | ||
84 | |||
85 | /* Check for PCI memory window */ | ||
86 | if (phys_addr >= start && (phys_addr + size - 1) <= end) | ||
87 | return (phys_t) | ||
88 | ((phys_addr - start) + Au1500_PCI_MEM_START); | ||
89 | } | ||
90 | #endif | ||
91 | |||
92 | /* | ||
93 | * All Au1xx0 SOCs have a PCMCIA controller. | ||
94 | * We setup our 32-bit pseudo addresses to be equal to the | ||
95 | * 36-bit addr >> 4, to make it easier to check the address | ||
96 | * and fix it. | ||
97 | * The PCMCIA socket 0 physical attribute address is 0xF 4000 0000. | ||
98 | * The pseudo address we use is 0xF400 0000. Any address over | ||
99 | * 0xF400 0000 is a PCMCIA pseudo address. | ||
100 | */ | ||
101 | if ((phys_addr >= PCMCIA_ATTR_PSEUDO_PHYS) && | ||
102 | (phys_addr < PCMCIA_PSEUDO_END)) | ||
103 | return (phys_t)(phys_addr << 4); | ||
104 | 86 | ||
105 | /* default nop */ | 87 | /* default nop */ |
106 | return phys_addr; | 88 | return phys_addr; |
diff --git a/arch/mips/alchemy/devboards/db1200/platform.c b/arch/mips/alchemy/devboards/db1200/platform.c index d6b3e64376c0..3cb95a98ab31 100644 --- a/arch/mips/alchemy/devboards/db1200/platform.c +++ b/arch/mips/alchemy/devboards/db1200/platform.c | |||
@@ -507,24 +507,24 @@ static int __init db1200_dev_init(void) | |||
507 | (void __iomem *)KSEG1ADDR(PSC1_PHYS_ADDR) + PSC_SEL_OFFSET); | 507 | (void __iomem *)KSEG1ADDR(PSC1_PHYS_ADDR) + PSC_SEL_OFFSET); |
508 | wmb(); | 508 | wmb(); |
509 | 509 | ||
510 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS, | 510 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR, |
511 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1, | 511 | PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, |
512 | PCMCIA_MEM_PSEUDO_PHYS, | 512 | PCMCIA_MEM_PHYS_ADDR, |
513 | PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1, | 513 | PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, |
514 | PCMCIA_IO_PSEUDO_PHYS, | 514 | PCMCIA_IO_PHYS_ADDR, |
515 | PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1, | 515 | PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, |
516 | DB1200_PC0_INT, | 516 | DB1200_PC0_INT, |
517 | DB1200_PC0_INSERT_INT, | 517 | DB1200_PC0_INSERT_INT, |
518 | /*DB1200_PC0_STSCHG_INT*/0, | 518 | /*DB1200_PC0_STSCHG_INT*/0, |
519 | DB1200_PC0_EJECT_INT, | 519 | DB1200_PC0_EJECT_INT, |
520 | 0); | 520 | 0); |
521 | 521 | ||
522 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS + 0x00400000, | 522 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR + 0x004000000, |
523 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00440000 - 1, | 523 | PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1, |
524 | PCMCIA_MEM_PSEUDO_PHYS + 0x00400000, | 524 | PCMCIA_MEM_PHYS_ADDR + 0x004000000, |
525 | PCMCIA_MEM_PSEUDO_PHYS + 0x00440000 - 1, | 525 | PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1, |
526 | PCMCIA_IO_PSEUDO_PHYS + 0x00400000, | 526 | PCMCIA_IO_PHYS_ADDR + 0x004000000, |
527 | PCMCIA_IO_PSEUDO_PHYS + 0x00401000 - 1, | 527 | PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1, |
528 | DB1200_PC1_INT, | 528 | DB1200_PC1_INT, |
529 | DB1200_PC1_INSERT_INT, | 529 | DB1200_PC1_INSERT_INT, |
530 | /*DB1200_PC1_STSCHG_INT*/0, | 530 | /*DB1200_PC1_STSCHG_INT*/0, |
diff --git a/arch/mips/alchemy/devboards/db1x00/platform.c b/arch/mips/alchemy/devboards/db1x00/platform.c index 62e2a96fe119..978d5ab3d678 100644 --- a/arch/mips/alchemy/devboards/db1x00/platform.c +++ b/arch/mips/alchemy/devboards/db1x00/platform.c | |||
@@ -88,24 +88,24 @@ | |||
88 | static int __init db1xxx_dev_init(void) | 88 | static int __init db1xxx_dev_init(void) |
89 | { | 89 | { |
90 | #ifdef DB1XXX_HAS_PCMCIA | 90 | #ifdef DB1XXX_HAS_PCMCIA |
91 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS, | 91 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR, |
92 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1, | 92 | PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, |
93 | PCMCIA_MEM_PSEUDO_PHYS, | 93 | PCMCIA_MEM_PHYS_ADDR, |
94 | PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1, | 94 | PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, |
95 | PCMCIA_IO_PSEUDO_PHYS, | 95 | PCMCIA_IO_PHYS_ADDR, |
96 | PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1, | 96 | PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, |
97 | DB1XXX_PCMCIA_CARD0, | 97 | DB1XXX_PCMCIA_CARD0, |
98 | DB1XXX_PCMCIA_CD0, | 98 | DB1XXX_PCMCIA_CD0, |
99 | /*DB1XXX_PCMCIA_STSCHG0*/0, | 99 | /*DB1XXX_PCMCIA_STSCHG0*/0, |
100 | 0, | 100 | 0, |
101 | 0); | 101 | 0); |
102 | 102 | ||
103 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS + 0x00400000, | 103 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR + 0x004000000, |
104 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00440000 - 1, | 104 | PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1, |
105 | PCMCIA_MEM_PSEUDO_PHYS + 0x00400000, | 105 | PCMCIA_MEM_PHYS_ADDR + 0x004000000, |
106 | PCMCIA_MEM_PSEUDO_PHYS + 0x00440000 - 1, | 106 | PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1, |
107 | PCMCIA_IO_PSEUDO_PHYS + 0x00400000, | 107 | PCMCIA_IO_PHYS_ADDR + 0x004000000, |
108 | PCMCIA_IO_PSEUDO_PHYS + 0x00401000 - 1, | 108 | PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1, |
109 | DB1XXX_PCMCIA_CARD1, | 109 | DB1XXX_PCMCIA_CARD1, |
110 | DB1XXX_PCMCIA_CD1, | 110 | DB1XXX_PCMCIA_CD1, |
111 | /*DB1XXX_PCMCIA_STSCHG1*/0, | 111 | /*DB1XXX_PCMCIA_STSCHG1*/0, |
diff --git a/arch/mips/alchemy/devboards/pb1100/platform.c b/arch/mips/alchemy/devboards/pb1100/platform.c index bfc5ab6a121c..2c8dc29759fd 100644 --- a/arch/mips/alchemy/devboards/pb1100/platform.c +++ b/arch/mips/alchemy/devboards/pb1100/platform.c | |||
@@ -30,12 +30,12 @@ static int __init pb1100_dev_init(void) | |||
30 | int swapped; | 30 | int swapped; |
31 | 31 | ||
32 | /* PCMCIA. single socket, identical to Pb1500 */ | 32 | /* PCMCIA. single socket, identical to Pb1500 */ |
33 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS, | 33 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR, |
34 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1, | 34 | PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, |
35 | PCMCIA_MEM_PSEUDO_PHYS, | 35 | PCMCIA_MEM_PHYS_ADDR, |
36 | PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1, | 36 | PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, |
37 | PCMCIA_IO_PSEUDO_PHYS, | 37 | PCMCIA_IO_PHYS_ADDR, |
38 | PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1, | 38 | PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, |
39 | AU1100_GPIO11_INT, /* card */ | 39 | AU1100_GPIO11_INT, /* card */ |
40 | AU1100_GPIO9_INT, /* insert */ | 40 | AU1100_GPIO9_INT, /* insert */ |
41 | /*AU1100_GPIO10_INT*/0, /* stschg */ | 41 | /*AU1100_GPIO10_INT*/0, /* stschg */ |
diff --git a/arch/mips/alchemy/devboards/pb1200/platform.c b/arch/mips/alchemy/devboards/pb1200/platform.c index 14e889fffcc5..3ef2dceeb796 100644 --- a/arch/mips/alchemy/devboards/pb1200/platform.c +++ b/arch/mips/alchemy/devboards/pb1200/platform.c | |||
@@ -170,24 +170,24 @@ static int __init board_register_devices(void) | |||
170 | { | 170 | { |
171 | int swapped; | 171 | int swapped; |
172 | 172 | ||
173 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS, | 173 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR, |
174 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1, | 174 | PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, |
175 | PCMCIA_MEM_PSEUDO_PHYS, | 175 | PCMCIA_MEM_PHYS_ADDR, |
176 | PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1, | 176 | PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, |
177 | PCMCIA_IO_PSEUDO_PHYS, | 177 | PCMCIA_IO_PHYS_ADDR, |
178 | PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1, | 178 | PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, |
179 | PB1200_PC0_INT, | 179 | PB1200_PC0_INT, |
180 | PB1200_PC0_INSERT_INT, | 180 | PB1200_PC0_INSERT_INT, |
181 | /*PB1200_PC0_STSCHG_INT*/0, | 181 | /*PB1200_PC0_STSCHG_INT*/0, |
182 | PB1200_PC0_EJECT_INT, | 182 | PB1200_PC0_EJECT_INT, |
183 | 0); | 183 | 0); |
184 | 184 | ||
185 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS + 0x00800000, | 185 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR + 0x008000000, |
186 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00840000 - 1, | 186 | PCMCIA_ATTR_PHYS_ADDR + 0x008400000 - 1, |
187 | PCMCIA_MEM_PSEUDO_PHYS + 0x00800000, | 187 | PCMCIA_MEM_PHYS_ADDR + 0x008000000, |
188 | PCMCIA_MEM_PSEUDO_PHYS + 0x00840000 - 1, | 188 | PCMCIA_MEM_PHYS_ADDR + 0x008400000 - 1, |
189 | PCMCIA_IO_PSEUDO_PHYS + 0x00800000, | 189 | PCMCIA_IO_PHYS_ADDR + 0x008000000, |
190 | PCMCIA_IO_PSEUDO_PHYS + 0x00801000 - 1, | 190 | PCMCIA_IO_PHYS_ADDR + 0x008010000 - 1, |
191 | PB1200_PC1_INT, | 191 | PB1200_PC1_INT, |
192 | PB1200_PC1_INSERT_INT, | 192 | PB1200_PC1_INSERT_INT, |
193 | /*PB1200_PC1_STSCHG_INT*/0, | 193 | /*PB1200_PC1_STSCHG_INT*/0, |
diff --git a/arch/mips/alchemy/devboards/pb1500/platform.c b/arch/mips/alchemy/devboards/pb1500/platform.c index 529acb789254..d443bc7aa76e 100644 --- a/arch/mips/alchemy/devboards/pb1500/platform.c +++ b/arch/mips/alchemy/devboards/pb1500/platform.c | |||
@@ -29,12 +29,12 @@ static int __init pb1500_dev_init(void) | |||
29 | int swapped; | 29 | int swapped; |
30 | 30 | ||
31 | /* PCMCIA. single socket, identical to Pb1500 */ | 31 | /* PCMCIA. single socket, identical to Pb1500 */ |
32 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS, | 32 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR, |
33 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1, | 33 | PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, |
34 | PCMCIA_MEM_PSEUDO_PHYS, | 34 | PCMCIA_MEM_PHYS_ADDR, |
35 | PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1, | 35 | PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, |
36 | PCMCIA_IO_PSEUDO_PHYS, | 36 | PCMCIA_IO_PHYS_ADDR, |
37 | PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1, | 37 | PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, |
38 | AU1500_GPIO11_INT, /* card */ | 38 | AU1500_GPIO11_INT, /* card */ |
39 | AU1500_GPIO9_INT, /* insert */ | 39 | AU1500_GPIO9_INT, /* insert */ |
40 | /*AU1500_GPIO10_INT*/0, /* stschg */ | 40 | /*AU1500_GPIO10_INT*/0, /* stschg */ |
diff --git a/arch/mips/alchemy/devboards/pb1550/platform.c b/arch/mips/alchemy/devboards/pb1550/platform.c index 461339166a4e..d7150d0f49c0 100644 --- a/arch/mips/alchemy/devboards/pb1550/platform.c +++ b/arch/mips/alchemy/devboards/pb1550/platform.c | |||
@@ -37,24 +37,24 @@ static int __init pb1550_dev_init(void) | |||
37 | * drivers are used to shared irqs and b) statuschange isn't really use- | 37 | * drivers are used to shared irqs and b) statuschange isn't really use- |
38 | * ful anyway. | 38 | * ful anyway. |
39 | */ | 39 | */ |
40 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS, | 40 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR, |
41 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1, | 41 | PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, |
42 | PCMCIA_MEM_PSEUDO_PHYS, | 42 | PCMCIA_MEM_PHYS_ADDR, |
43 | PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1, | 43 | PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, |
44 | PCMCIA_IO_PSEUDO_PHYS, | 44 | PCMCIA_IO_PHYS_ADDR, |
45 | PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1, | 45 | PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1, |
46 | AU1550_GPIO201_205_INT, | 46 | AU1550_GPIO201_205_INT, |
47 | AU1550_GPIO0_INT, | 47 | AU1550_GPIO0_INT, |
48 | 0, | 48 | 0, |
49 | 0, | 49 | 0, |
50 | 0); | 50 | 0); |
51 | 51 | ||
52 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS + 0x00800000, | 52 | db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR + 0x008000000, |
53 | PCMCIA_ATTR_PSEUDO_PHYS + 0x00840000 - 1, | 53 | PCMCIA_ATTR_PHYS_ADDR + 0x008400000 - 1, |
54 | PCMCIA_MEM_PSEUDO_PHYS + 0x00800000, | 54 | PCMCIA_MEM_PHYS_ADDR + 0x008000000, |
55 | PCMCIA_MEM_PSEUDO_PHYS + 0x00840000 - 1, | 55 | PCMCIA_MEM_PHYS_ADDR + 0x008400000 - 1, |
56 | PCMCIA_IO_PSEUDO_PHYS + 0x00800000, | 56 | PCMCIA_IO_PHYS_ADDR + 0x008000000, |
57 | PCMCIA_IO_PSEUDO_PHYS + 0x00801000 - 1, | 57 | PCMCIA_IO_PHYS_ADDR + 0x008010000 - 1, |
58 | AU1550_GPIO201_205_INT, | 58 | AU1550_GPIO201_205_INT, |
59 | AU1550_GPIO1_INT, | 59 | AU1550_GPIO1_INT, |
60 | 0, | 60 | 0, |
diff --git a/arch/mips/alchemy/devboards/platform.c b/arch/mips/alchemy/devboards/platform.c index febf4e042343..49a4b3244d8e 100644 --- a/arch/mips/alchemy/devboards/platform.c +++ b/arch/mips/alchemy/devboards/platform.c | |||
@@ -39,12 +39,12 @@ static int __init db1x_poweroff_setup(void) | |||
39 | late_initcall(db1x_poweroff_setup); | 39 | late_initcall(db1x_poweroff_setup); |
40 | 40 | ||
41 | /* register a pcmcia socket */ | 41 | /* register a pcmcia socket */ |
42 | int __init db1x_register_pcmcia_socket(unsigned long pseudo_attr_start, | 42 | int __init db1x_register_pcmcia_socket(phys_addr_t pcmcia_attr_start, |
43 | unsigned long pseudo_attr_end, | 43 | phys_addr_t pcmcia_attr_end, |
44 | unsigned long pseudo_mem_start, | 44 | phys_addr_t pcmcia_mem_start, |
45 | unsigned long pseudo_mem_end, | 45 | phys_addr_t pcmcia_mem_end, |
46 | unsigned long pseudo_io_start, | 46 | phys_addr_t pcmcia_io_start, |
47 | unsigned long pseudo_io_end, | 47 | phys_addr_t pcmcia_io_end, |
48 | int card_irq, | 48 | int card_irq, |
49 | int cd_irq, | 49 | int cd_irq, |
50 | int stschg_irq, | 50 | int stschg_irq, |
@@ -71,20 +71,20 @@ int __init db1x_register_pcmcia_socket(unsigned long pseudo_attr_start, | |||
71 | goto out; | 71 | goto out; |
72 | } | 72 | } |
73 | 73 | ||
74 | sr[0].name = "pseudo-attr"; | 74 | sr[0].name = "pcmcia-attr"; |
75 | sr[0].flags = IORESOURCE_MEM; | 75 | sr[0].flags = IORESOURCE_MEM; |
76 | sr[0].start = pseudo_attr_start; | 76 | sr[0].start = pcmcia_attr_start; |
77 | sr[0].end = pseudo_attr_end; | 77 | sr[0].end = pcmcia_attr_end; |
78 | 78 | ||
79 | sr[1].name = "pseudo-mem"; | 79 | sr[1].name = "pcmcia-mem"; |
80 | sr[1].flags = IORESOURCE_MEM; | 80 | sr[1].flags = IORESOURCE_MEM; |
81 | sr[1].start = pseudo_mem_start; | 81 | sr[1].start = pcmcia_mem_start; |
82 | sr[1].end = pseudo_mem_end; | 82 | sr[1].end = pcmcia_mem_end; |
83 | 83 | ||
84 | sr[2].name = "pseudo-io"; | 84 | sr[2].name = "pcmcia-io"; |
85 | sr[2].flags = IORESOURCE_MEM; | 85 | sr[2].flags = IORESOURCE_MEM; |
86 | sr[2].start = pseudo_io_start; | 86 | sr[2].start = pcmcia_io_start; |
87 | sr[2].end = pseudo_io_end; | 87 | sr[2].end = pcmcia_io_end; |
88 | 88 | ||
89 | sr[3].name = "insert"; | 89 | sr[3].name = "insert"; |
90 | sr[3].flags = IORESOURCE_IRQ; | 90 | sr[3].flags = IORESOURCE_IRQ; |
@@ -96,9 +96,9 @@ int __init db1x_register_pcmcia_socket(unsigned long pseudo_attr_start, | |||
96 | 96 | ||
97 | i = 5; | 97 | i = 5; |
98 | if (stschg_irq) { | 98 | if (stschg_irq) { |
99 | sr[i].name = "insert"; | 99 | sr[i].name = "stschg"; |
100 | sr[i].flags = IORESOURCE_IRQ; | 100 | sr[i].flags = IORESOURCE_IRQ; |
101 | sr[i].start = sr[i].end = cd_irq; | 101 | sr[i].start = sr[i].end = stschg_irq; |
102 | i++; | 102 | i++; |
103 | } | 103 | } |
104 | if (eject_irq) { | 104 | if (eject_irq) { |
diff --git a/arch/mips/alchemy/devboards/platform.h b/arch/mips/alchemy/devboards/platform.h index 828c54e31157..5ac055d2cda9 100644 --- a/arch/mips/alchemy/devboards/platform.h +++ b/arch/mips/alchemy/devboards/platform.h | |||
@@ -3,12 +3,12 @@ | |||
3 | 3 | ||
4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
5 | 5 | ||
6 | int __init db1x_register_pcmcia_socket(unsigned long pseudo_attr_start, | 6 | int __init db1x_register_pcmcia_socket(phys_addr_t pcmcia_attr_start, |
7 | unsigned long pseudo_attr_len, | 7 | phys_addr_t pcmcia_attr_len, |
8 | unsigned long pseudo_mem_start, | 8 | phys_addr_t pcmcia_mem_start, |
9 | unsigned long pseudo_mem_end, | 9 | phys_addr_t pcmcia_mem_end, |
10 | unsigned long pseudo_io_start, | 10 | phys_addr_t pcmcia_io_start, |
11 | unsigned long pseudo_io_end, | 11 | phys_addr_t pcmcia_io_end, |
12 | int card_irq, | 12 | int card_irq, |
13 | int cd_irq, | 13 | int cd_irq, |
14 | int stschg_irq, | 14 | int stschg_irq, |
diff --git a/arch/mips/alchemy/xxs1500/platform.c b/arch/mips/alchemy/xxs1500/platform.c index c14dcaa95311..e87c45cde61b 100644 --- a/arch/mips/alchemy/xxs1500/platform.c +++ b/arch/mips/alchemy/xxs1500/platform.c | |||
@@ -25,22 +25,22 @@ | |||
25 | 25 | ||
26 | static struct resource xxs1500_pcmcia_res[] = { | 26 | static struct resource xxs1500_pcmcia_res[] = { |
27 | { | 27 | { |
28 | .name = "pseudo-io", | 28 | .name = "pcmcia-io", |
29 | .flags = IORESOURCE_MEM, | 29 | .flags = IORESOURCE_MEM, |
30 | .start = PCMCIA_IO_PSEUDO_PHYS, | 30 | .start = PCMCIA_IO_PHYS_ADDR, |
31 | .end = PCMCIA_IO_PSEUDO_PHYS + 0x00040000 - 1, | 31 | .end = PCMCIA_IO_PHYS_ADDR + 0x000400000 - 1, |
32 | }, | 32 | }, |
33 | { | 33 | { |
34 | .name = "pseudo-attr", | 34 | .name = "pcmcia-attr", |
35 | .flags = IORESOURCE_MEM, | 35 | .flags = IORESOURCE_MEM, |
36 | .start = PCMCIA_ATTR_PSEUDO_PHYS, | 36 | .start = PCMCIA_ATTR_PHYS_ADDR, |
37 | .end = PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1, | 37 | .end = PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1, |
38 | }, | 38 | }, |
39 | { | 39 | { |
40 | .name = "pseudo-mem", | 40 | .name = "pcmcia-mem", |
41 | .flags = IORESOURCE_MEM, | 41 | .flags = IORESOURCE_MEM, |
42 | .start = PCMCIA_IO_PSEUDO_PHYS, | 42 | .start = PCMCIA_MEM_PHYS_ADDR, |
43 | .end = PCMCIA_IO_PSEUDO_PHYS + 0x00040000 - 1, | 43 | .end = PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1, |
44 | }, | 44 | }, |
45 | }; | 45 | }; |
46 | 46 | ||
diff --git a/arch/mips/include/asm/mach-au1x00/au1000.h b/arch/mips/include/asm/mach-au1x00/au1000.h index 2805fc56484d..ae07423e6e82 100644 --- a/arch/mips/include/asm/mach-au1x00/au1000.h +++ b/arch/mips/include/asm/mach-au1x00/au1000.h | |||
@@ -1678,18 +1678,4 @@ enum soc_au1200_ints { | |||
1678 | 1678 | ||
1679 | #endif | 1679 | #endif |
1680 | 1680 | ||
1681 | /* | ||
1682 | * All Au1xx0 SOCs have a PCMCIA controller. | ||
1683 | * We setup our 32-bit pseudo addresses to be equal to the | ||
1684 | * 36-bit addr >> 4, to make it easier to check the address | ||
1685 | * and fix it. | ||
1686 | * The PCMCIA socket 0 physical attribute address is 0xF 4000 0000. | ||
1687 | * The pseudo address we use is 0xF400 0000. Any address over | ||
1688 | * 0xF400 0000 is a PCMCIA pseudo address. | ||
1689 | */ | ||
1690 | #define PCMCIA_IO_PSEUDO_PHYS (PCMCIA_IO_PHYS_ADDR >> 4) | ||
1691 | #define PCMCIA_ATTR_PSEUDO_PHYS (PCMCIA_ATTR_PHYS_ADDR >> 4) | ||
1692 | #define PCMCIA_MEM_PSEUDO_PHYS (PCMCIA_MEM_PHYS_ADDR >> 4) | ||
1693 | #define PCMCIA_PSEUDO_END (0xffffffff) | ||
1694 | |||
1695 | #endif | 1681 | #endif |
diff --git a/arch/mips/include/asm/mach-au1x00/ioremap.h b/arch/mips/include/asm/mach-au1x00/ioremap.h index 364cea2dc71f..75a94ad3ac91 100644 --- a/arch/mips/include/asm/mach-au1x00/ioremap.h +++ b/arch/mips/include/asm/mach-au1x00/ioremap.h | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | 13 | ||
14 | #ifdef CONFIG_64BIT_PHYS_ADDR | 14 | #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_PCI) |
15 | extern phys_t __fixup_bigphys_addr(phys_t, phys_t); | 15 | extern phys_t __fixup_bigphys_addr(phys_t, phys_t); |
16 | #else | 16 | #else |
17 | static inline phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) | 17 | static inline phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size) |
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c index 02088704ac2c..171c8a654887 100644 --- a/drivers/pcmcia/au1000_generic.c +++ b/drivers/pcmcia/au1000_generic.c | |||
@@ -405,18 +405,16 @@ int au1x00_pcmcia_socket_probe(struct device *dev, struct pcmcia_low_level *ops, | |||
405 | skt->virt_io = (void *) | 405 | skt->virt_io = (void *) |
406 | (ioremap((phys_t)AU1X_SOCK0_IO, 0x1000) - | 406 | (ioremap((phys_t)AU1X_SOCK0_IO, 0x1000) - |
407 | (u32)mips_io_port_base); | 407 | (u32)mips_io_port_base); |
408 | skt->phys_attr = AU1X_SOCK0_PSEUDO_PHYS_ATTR; | 408 | skt->phys_attr = AU1X_SOCK0_PHYS_ATTR; |
409 | skt->phys_mem = AU1X_SOCK0_PSEUDO_PHYS_MEM; | 409 | skt->phys_mem = AU1X_SOCK0_PHYS_MEM; |
410 | } | 410 | } |
411 | #ifndef CONFIG_MIPS_XXS1500 | ||
412 | else { | 411 | else { |
413 | skt->virt_io = (void *) | 412 | skt->virt_io = (void *) |
414 | (ioremap((phys_t)AU1X_SOCK1_IO, 0x1000) - | 413 | (ioremap((phys_t)AU1X_SOCK1_IO, 0x1000) - |
415 | (u32)mips_io_port_base); | 414 | (u32)mips_io_port_base); |
416 | skt->phys_attr = AU1X_SOCK1_PSEUDO_PHYS_ATTR; | 415 | skt->phys_attr = AU1X_SOCK1_PHYS_ATTR; |
417 | skt->phys_mem = AU1X_SOCK1_PSEUDO_PHYS_MEM; | 416 | skt->phys_mem = AU1X_SOCK1_PHYS_MEM; |
418 | } | 417 | } |
419 | #endif | ||
420 | pcmcia_base_vaddrs[i] = (u32 *)skt->virt_io; | 418 | pcmcia_base_vaddrs[i] = (u32 *)skt->virt_io; |
421 | ret = ops->hw_init(skt); | 419 | ret = ops->hw_init(skt); |
422 | 420 | ||
diff --git a/drivers/pcmcia/au1000_generic.h b/drivers/pcmcia/au1000_generic.h index aa743f6875bd..a324d329dea6 100644 --- a/drivers/pcmcia/au1000_generic.h +++ b/drivers/pcmcia/au1000_generic.h | |||
@@ -36,10 +36,6 @@ | |||
36 | #define AU1X_SOCK0_IO 0xF00000000ULL | 36 | #define AU1X_SOCK0_IO 0xF00000000ULL |
37 | #define AU1X_SOCK0_PHYS_ATTR 0xF40000000ULL | 37 | #define AU1X_SOCK0_PHYS_ATTR 0xF40000000ULL |
38 | #define AU1X_SOCK0_PHYS_MEM 0xF80000000ULL | 38 | #define AU1X_SOCK0_PHYS_MEM 0xF80000000ULL |
39 | /* pseudo 32 bit phys addresses, which get fixed up to the | ||
40 | * real 36 bit address in fixup_bigphys_addr() */ | ||
41 | #define AU1X_SOCK0_PSEUDO_PHYS_ATTR 0xF4000000 | ||
42 | #define AU1X_SOCK0_PSEUDO_PHYS_MEM 0xF8000000 | ||
43 | 39 | ||
44 | /* pcmcia socket 1 needs external glue logic so the memory map | 40 | /* pcmcia socket 1 needs external glue logic so the memory map |
45 | * differs from board to board. | 41 | * differs from board to board. |
@@ -48,8 +44,6 @@ | |||
48 | #define AU1X_SOCK1_IO 0xF08000000ULL | 44 | #define AU1X_SOCK1_IO 0xF08000000ULL |
49 | #define AU1X_SOCK1_PHYS_ATTR 0xF48000000ULL | 45 | #define AU1X_SOCK1_PHYS_ATTR 0xF48000000ULL |
50 | #define AU1X_SOCK1_PHYS_MEM 0xF88000000ULL | 46 | #define AU1X_SOCK1_PHYS_MEM 0xF88000000ULL |
51 | #define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4800000 | ||
52 | #define AU1X_SOCK1_PSEUDO_PHYS_MEM 0xF8800000 | ||
53 | #endif | 47 | #endif |
54 | 48 | ||
55 | struct pcmcia_state { | 49 | struct pcmcia_state { |
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c index b35b72b0d5b5..3889cf07d6ce 100644 --- a/drivers/pcmcia/db1xxx_ss.c +++ b/drivers/pcmcia/db1xxx_ss.c | |||
@@ -43,9 +43,9 @@ struct db1x_pcmcia_sock { | |||
43 | void *virt_io; | 43 | void *virt_io; |
44 | 44 | ||
45 | /* the "pseudo" addresses of the PCMCIA space. */ | 45 | /* the "pseudo" addresses of the PCMCIA space. */ |
46 | unsigned long phys_io; | 46 | phys_addr_t phys_io; |
47 | unsigned long phys_attr; | 47 | phys_addr_t phys_attr; |
48 | unsigned long phys_mem; | 48 | phys_addr_t phys_mem; |
49 | 49 | ||
50 | /* previous flags for set_socket() */ | 50 | /* previous flags for set_socket() */ |
51 | unsigned int old_flags; | 51 | unsigned int old_flags; |
@@ -404,7 +404,6 @@ static int __devinit db1x_pcmcia_socket_probe(struct platform_device *pdev) | |||
404 | { | 404 | { |
405 | struct db1x_pcmcia_sock *sock; | 405 | struct db1x_pcmcia_sock *sock; |
406 | struct resource *r; | 406 | struct resource *r; |
407 | phys_t physio; | ||
408 | int ret, bid; | 407 | int ret, bid; |
409 | 408 | ||
410 | sock = kzalloc(sizeof(struct db1x_pcmcia_sock), GFP_KERNEL); | 409 | sock = kzalloc(sizeof(struct db1x_pcmcia_sock), GFP_KERNEL); |
@@ -465,7 +464,7 @@ static int __devinit db1x_pcmcia_socket_probe(struct platform_device *pdev) | |||
465 | * for this socket (usually the 36bit address shifted 4 to the | 464 | * for this socket (usually the 36bit address shifted 4 to the |
466 | * right). | 465 | * right). |
467 | */ | 466 | */ |
468 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-attr"); | 467 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-attr"); |
469 | if (!r) { | 468 | if (!r) { |
470 | printk(KERN_ERR "pcmcia%d has no 'pseudo-attr' resource!\n", | 469 | printk(KERN_ERR "pcmcia%d has no 'pseudo-attr' resource!\n", |
471 | sock->nr); | 470 | sock->nr); |
@@ -477,7 +476,7 @@ static int __devinit db1x_pcmcia_socket_probe(struct platform_device *pdev) | |||
477 | * pseudo-mem: The 32bit address of the PCMCIA memory space for | 476 | * pseudo-mem: The 32bit address of the PCMCIA memory space for |
478 | * this socket (usually the 36bit address shifted 4 to the right) | 477 | * this socket (usually the 36bit address shifted 4 to the right) |
479 | */ | 478 | */ |
480 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-mem"); | 479 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-mem"); |
481 | if (!r) { | 480 | if (!r) { |
482 | printk(KERN_ERR "pcmcia%d has no 'pseudo-mem' resource!\n", | 481 | printk(KERN_ERR "pcmcia%d has no 'pseudo-mem' resource!\n", |
483 | sock->nr); | 482 | sock->nr); |
@@ -489,7 +488,7 @@ static int __devinit db1x_pcmcia_socket_probe(struct platform_device *pdev) | |||
489 | * pseudo-io: The 32bit address of the PCMCIA IO space for this | 488 | * pseudo-io: The 32bit address of the PCMCIA IO space for this |
490 | * socket (usually the 36bit address shifted 4 to the right). | 489 | * socket (usually the 36bit address shifted 4 to the right). |
491 | */ | 490 | */ |
492 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-io"); | 491 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-io"); |
493 | if (!r) { | 492 | if (!r) { |
494 | printk(KERN_ERR "pcmcia%d has no 'pseudo-io' resource!\n", | 493 | printk(KERN_ERR "pcmcia%d has no 'pseudo-io' resource!\n", |
495 | sock->nr); | 494 | sock->nr); |
@@ -497,12 +496,6 @@ static int __devinit db1x_pcmcia_socket_probe(struct platform_device *pdev) | |||
497 | } | 496 | } |
498 | sock->phys_io = r->start; | 497 | sock->phys_io = r->start; |
499 | 498 | ||
500 | |||
501 | /* IO: we must remap the full 36bit address (for reference see | ||
502 | * alchemy/common/setup.c::__fixup_bigphys_addr()) | ||
503 | */ | ||
504 | physio = ((phys_t)sock->phys_io) << 4; | ||
505 | |||
506 | /* | 499 | /* |
507 | * PCMCIA client drivers use the inb/outb macros to access | 500 | * PCMCIA client drivers use the inb/outb macros to access |
508 | * the IO registers. Since mips_io_port_base is added | 501 | * the IO registers. Since mips_io_port_base is added |
@@ -511,7 +504,7 @@ static int __devinit db1x_pcmcia_socket_probe(struct platform_device *pdev) | |||
511 | * to access the I/O or MEM address directly, without | 504 | * to access the I/O or MEM address directly, without |
512 | * going through this "mips_io_port_base" mechanism. | 505 | * going through this "mips_io_port_base" mechanism. |
513 | */ | 506 | */ |
514 | sock->virt_io = (void *)(ioremap(physio, IO_MAP_SIZE) - | 507 | sock->virt_io = (void *)(ioremap(sock->phys_io, IO_MAP_SIZE) - |
515 | mips_io_port_base); | 508 | mips_io_port_base); |
516 | 509 | ||
517 | if (!sock->virt_io) { | 510 | if (!sock->virt_io) { |
@@ -547,8 +540,8 @@ static int __devinit db1x_pcmcia_socket_probe(struct platform_device *pdev) | |||
547 | goto out2; | 540 | goto out2; |
548 | } | 541 | } |
549 | 542 | ||
550 | printk(KERN_INFO "Alchemy Db/Pb1xxx pcmcia%d @ io/attr/mem %08lx" | 543 | printk(KERN_INFO "Alchemy Db/Pb1xxx pcmcia%d @ io/attr/mem %09llx" |
551 | "(%p) %08lx %08lx card/insert/stschg/eject irqs @ %d " | 544 | "(%p) %09llx %09llx card/insert/stschg/eject irqs @ %d " |
552 | "%d %d %d\n", sock->nr, sock->phys_io, sock->virt_io, | 545 | "%d %d %d\n", sock->nr, sock->phys_io, sock->virt_io, |
553 | sock->phys_attr, sock->phys_mem, sock->card_irq, | 546 | sock->phys_attr, sock->phys_mem, sock->card_irq, |
554 | sock->insert_irq, sock->stschg_irq, sock->eject_irq); | 547 | sock->insert_irq, sock->stschg_irq, sock->eject_irq); |
diff --git a/drivers/pcmcia/xxs1500_ss.c b/drivers/pcmcia/xxs1500_ss.c index 4e36930b51ce..61560cd6e287 100644 --- a/drivers/pcmcia/xxs1500_ss.c +++ b/drivers/pcmcia/xxs1500_ss.c | |||
@@ -56,10 +56,9 @@ struct xxs1500_pcmcia_sock { | |||
56 | struct pcmcia_socket socket; | 56 | struct pcmcia_socket socket; |
57 | void *virt_io; | 57 | void *virt_io; |
58 | 58 | ||
59 | /* the "pseudo" addresses of the PCMCIA space. */ | 59 | phys_addr_t phys_io; |
60 | unsigned long phys_io; | 60 | phys_addr_t phys_attr; |
61 | unsigned long phys_attr; | 61 | phys_addr_t phys_mem; |
62 | unsigned long phys_mem; | ||
63 | 62 | ||
64 | /* previous flags for set_socket() */ | 63 | /* previous flags for set_socket() */ |
65 | unsigned int old_flags; | 64 | unsigned int old_flags; |
@@ -211,7 +210,6 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
211 | { | 210 | { |
212 | struct xxs1500_pcmcia_sock *sock; | 211 | struct xxs1500_pcmcia_sock *sock; |
213 | struct resource *r; | 212 | struct resource *r; |
214 | phys_t physio; | ||
215 | int ret, irq; | 213 | int ret, irq; |
216 | 214 | ||
217 | sock = kzalloc(sizeof(struct xxs1500_pcmcia_sock), GFP_KERNEL); | 215 | sock = kzalloc(sizeof(struct xxs1500_pcmcia_sock), GFP_KERNEL); |
@@ -225,9 +223,9 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
225 | * for this socket (usually the 36bit address shifted 4 to the | 223 | * for this socket (usually the 36bit address shifted 4 to the |
226 | * right). | 224 | * right). |
227 | */ | 225 | */ |
228 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-attr"); | 226 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-attr"); |
229 | if (!r) { | 227 | if (!r) { |
230 | dev_err(&pdev->dev, "missing 'pseudo-attr' resource!\n"); | 228 | dev_err(&pdev->dev, "missing 'pcmcia-attr' resource!\n"); |
231 | goto out0; | 229 | goto out0; |
232 | } | 230 | } |
233 | sock->phys_attr = r->start; | 231 | sock->phys_attr = r->start; |
@@ -236,9 +234,9 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
236 | * pseudo-mem: The 32bit address of the PCMCIA memory space for | 234 | * pseudo-mem: The 32bit address of the PCMCIA memory space for |
237 | * this socket (usually the 36bit address shifted 4 to the right) | 235 | * this socket (usually the 36bit address shifted 4 to the right) |
238 | */ | 236 | */ |
239 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-mem"); | 237 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-mem"); |
240 | if (!r) { | 238 | if (!r) { |
241 | dev_err(&pdev->dev, "missing 'pseudo-mem' resource!\n"); | 239 | dev_err(&pdev->dev, "missing 'pcmcia-mem' resource!\n"); |
242 | goto out0; | 240 | goto out0; |
243 | } | 241 | } |
244 | sock->phys_mem = r->start; | 242 | sock->phys_mem = r->start; |
@@ -247,19 +245,14 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
247 | * pseudo-io: The 32bit address of the PCMCIA IO space for this | 245 | * pseudo-io: The 32bit address of the PCMCIA IO space for this |
248 | * socket (usually the 36bit address shifted 4 to the right). | 246 | * socket (usually the 36bit address shifted 4 to the right). |
249 | */ | 247 | */ |
250 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-io"); | 248 | r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-io"); |
251 | if (!r) { | 249 | if (!r) { |
252 | dev_err(&pdev->dev, "missing 'pseudo-io' resource!\n"); | 250 | dev_err(&pdev->dev, "missing 'pcmcia-io' resource!\n"); |
253 | goto out0; | 251 | goto out0; |
254 | } | 252 | } |
255 | sock->phys_io = r->start; | 253 | sock->phys_io = r->start; |
256 | 254 | ||
257 | 255 | ||
258 | /* for io must remap the full 36bit address (for reference see | ||
259 | * alchemy/common/setup.c::__fixup_bigphys_addr) | ||
260 | */ | ||
261 | physio = ((phys_t)sock->phys_io) << 4; | ||
262 | |||
263 | /* | 256 | /* |
264 | * PCMCIA client drivers use the inb/outb macros to access | 257 | * PCMCIA client drivers use the inb/outb macros to access |
265 | * the IO registers. Since mips_io_port_base is added | 258 | * the IO registers. Since mips_io_port_base is added |
@@ -268,7 +261,7 @@ static int __devinit xxs1500_pcmcia_probe(struct platform_device *pdev) | |||
268 | * to access the I/O or MEM address directly, without | 261 | * to access the I/O or MEM address directly, without |
269 | * going through this "mips_io_port_base" mechanism. | 262 | * going through this "mips_io_port_base" mechanism. |
270 | */ | 263 | */ |
271 | sock->virt_io = (void *)(ioremap(physio, IO_MAP_SIZE) - | 264 | sock->virt_io = (void *)(ioremap(sock->phys_io, IO_MAP_SIZE) - |
272 | mips_io_port_base); | 265 | mips_io_port_base); |
273 | 266 | ||
274 | if (!sock->virt_io) { | 267 | if (!sock->virt_io) { |