aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/alchemy/devboards
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2010-02-24 11:40:21 -0500
committerRalf Baechle <ralf@linux-mips.org>2010-02-27 06:53:43 -0500
commit11b897cf84c37e6522db914793677e933ef311fb (patch)
treeb9d69cea86b2c1673f30332ff9b3944dc00bfc9b /arch/mips/alchemy/devboards
parentb9b37787d24cca9fbd63f767663e9439fa69aa22 (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>
Diffstat (limited to 'arch/mips/alchemy/devboards')
-rw-r--r--arch/mips/alchemy/devboards/db1200/platform.c24
-rw-r--r--arch/mips/alchemy/devboards/db1x00/platform.c24
-rw-r--r--arch/mips/alchemy/devboards/pb1100/platform.c12
-rw-r--r--arch/mips/alchemy/devboards/pb1200/platform.c24
-rw-r--r--arch/mips/alchemy/devboards/pb1500/platform.c12
-rw-r--r--arch/mips/alchemy/devboards/pb1550/platform.c24
-rw-r--r--arch/mips/alchemy/devboards/platform.c34
-rw-r--r--arch/mips/alchemy/devboards/platform.h12
8 files changed, 83 insertions, 83 deletions
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 @@
88static int __init db1xxx_dev_init(void) 88static 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)
39late_initcall(db1x_poweroff_setup); 39late_initcall(db1x_poweroff_setup);
40 40
41/* register a pcmcia socket */ 41/* register a pcmcia socket */
42int __init db1x_register_pcmcia_socket(unsigned long pseudo_attr_start, 42int __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
6int __init db1x_register_pcmcia_socket(unsigned long pseudo_attr_start, 6int __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,