iomem_resource.end = IOMEM_RESOURCE_END;
}
-#if defined(CONFIG_64BIT_PHYS_ADDR)
+#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_PCI)
/* This routine should be valid for all Au1x based boards */
phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
{
+ u32 start = (u32)Au1500_PCI_MEM_START;
+ u32 end = (u32)Au1500_PCI_MEM_END;
+
/* Don't fixup 36-bit addresses */
if ((phys_addr >> 32) != 0)
return phys_addr;
-#ifdef CONFIG_PCI
- {
- u32 start = (u32)Au1500_PCI_MEM_START;
- u32 end = (u32)Au1500_PCI_MEM_END;
-
- /* Check for PCI memory window */
- if (phys_addr >= start && (phys_addr + size - 1) <= end)
- return (phys_t)
- ((phys_addr - start) + Au1500_PCI_MEM_START);
- }
-#endif
-
- /*
- * All Au1xx0 SOCs have a PCMCIA controller.
- * We setup our 32-bit pseudo addresses to be equal to the
- * 36-bit addr >> 4, to make it easier to check the address
- * and fix it.
- * The PCMCIA socket 0 physical attribute address is 0xF 4000 0000.
- * The pseudo address we use is 0xF400 0000. Any address over
- * 0xF400 0000 is a PCMCIA pseudo address.
- */
- if ((phys_addr >= PCMCIA_ATTR_PSEUDO_PHYS) &&
- (phys_addr < PCMCIA_PSEUDO_END))
- return (phys_t)(phys_addr << 4);
+ /* Check for PCI memory window */
+ if (phys_addr >= start && (phys_addr + size - 1) <= end)
+ return (phys_t)((phys_addr - start) + Au1500_PCI_MEM_START);
/* default nop */
return phys_addr;
(void __iomem *)KSEG1ADDR(PSC1_PHYS_ADDR) + PSC_SEL_OFFSET);
wmb();
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_IO_PSEUDO_PHYS,
- PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR,
+ PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR,
+ PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_IO_PHYS_ADDR,
+ PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
DB1200_PC0_INT,
DB1200_PC0_INSERT_INT,
/*DB1200_PC0_STSCHG_INT*/0,
DB1200_PC0_EJECT_INT,
0);
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS + 0x00400000,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00440000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00400000,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00440000 - 1,
- PCMCIA_IO_PSEUDO_PHYS + 0x00400000,
- PCMCIA_IO_PSEUDO_PHYS + 0x00401000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR + 0x004000000,
+ PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR + 0x004000000,
+ PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1,
+ PCMCIA_IO_PHYS_ADDR + 0x004000000,
+ PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1,
DB1200_PC1_INT,
DB1200_PC1_INSERT_INT,
/*DB1200_PC1_STSCHG_INT*/0,
static int __init db1xxx_dev_init(void)
{
#ifdef DB1XXX_HAS_PCMCIA
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_IO_PSEUDO_PHYS,
- PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR,
+ PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR,
+ PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_IO_PHYS_ADDR,
+ PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
DB1XXX_PCMCIA_CARD0,
DB1XXX_PCMCIA_CD0,
/*DB1XXX_PCMCIA_STSCHG0*/0,
0,
0);
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS + 0x00400000,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00440000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00400000,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00440000 - 1,
- PCMCIA_IO_PSEUDO_PHYS + 0x00400000,
- PCMCIA_IO_PSEUDO_PHYS + 0x00401000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR + 0x004000000,
+ PCMCIA_ATTR_PHYS_ADDR + 0x004400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR + 0x004000000,
+ PCMCIA_MEM_PHYS_ADDR + 0x004400000 - 1,
+ PCMCIA_IO_PHYS_ADDR + 0x004000000,
+ PCMCIA_IO_PHYS_ADDR + 0x004010000 - 1,
DB1XXX_PCMCIA_CARD1,
DB1XXX_PCMCIA_CD1,
/*DB1XXX_PCMCIA_STSCHG1*/0,
int swapped;
/* PCMCIA. single socket, identical to Pb1500 */
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_IO_PSEUDO_PHYS,
- PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR,
+ PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR,
+ PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_IO_PHYS_ADDR,
+ PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
AU1100_GPIO11_INT, /* card */
AU1100_GPIO9_INT, /* insert */
/*AU1100_GPIO10_INT*/0, /* stschg */
{
int swapped;
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_IO_PSEUDO_PHYS,
- PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR,
+ PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR,
+ PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_IO_PHYS_ADDR,
+ PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
PB1200_PC0_INT,
PB1200_PC0_INSERT_INT,
/*PB1200_PC0_STSCHG_INT*/0,
PB1200_PC0_EJECT_INT,
0);
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS + 0x00800000,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00840000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00800000,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00840000 - 1,
- PCMCIA_IO_PSEUDO_PHYS + 0x00800000,
- PCMCIA_IO_PSEUDO_PHYS + 0x00801000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR + 0x008000000,
+ PCMCIA_ATTR_PHYS_ADDR + 0x008400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR + 0x008000000,
+ PCMCIA_MEM_PHYS_ADDR + 0x008400000 - 1,
+ PCMCIA_IO_PHYS_ADDR + 0x008000000,
+ PCMCIA_IO_PHYS_ADDR + 0x008010000 - 1,
PB1200_PC1_INT,
PB1200_PC1_INSERT_INT,
/*PB1200_PC1_STSCHG_INT*/0,
int swapped;
/* PCMCIA. single socket, identical to Pb1500 */
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_IO_PSEUDO_PHYS,
- PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR,
+ PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR,
+ PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_IO_PHYS_ADDR,
+ PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
AU1500_GPIO11_INT, /* card */
AU1500_GPIO9_INT, /* insert */
/*AU1500_GPIO10_INT*/0, /* stschg */
* drivers are used to shared irqs and b) statuschange isn't really use-
* ful anyway.
*/
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00040000 - 1,
- PCMCIA_IO_PSEUDO_PHYS,
- PCMCIA_IO_PSEUDO_PHYS + 0x00001000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR,
+ PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR,
+ PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
+ PCMCIA_IO_PHYS_ADDR,
+ PCMCIA_IO_PHYS_ADDR + 0x000010000 - 1,
AU1550_GPIO201_205_INT,
AU1550_GPIO0_INT,
0,
0,
0);
- db1x_register_pcmcia_socket(PCMCIA_ATTR_PSEUDO_PHYS + 0x00800000,
- PCMCIA_ATTR_PSEUDO_PHYS + 0x00840000 - 1,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00800000,
- PCMCIA_MEM_PSEUDO_PHYS + 0x00840000 - 1,
- PCMCIA_IO_PSEUDO_PHYS + 0x00800000,
- PCMCIA_IO_PSEUDO_PHYS + 0x00801000 - 1,
+ db1x_register_pcmcia_socket(PCMCIA_ATTR_PHYS_ADDR + 0x008000000,
+ PCMCIA_ATTR_PHYS_ADDR + 0x008400000 - 1,
+ PCMCIA_MEM_PHYS_ADDR + 0x008000000,
+ PCMCIA_MEM_PHYS_ADDR + 0x008400000 - 1,
+ PCMCIA_IO_PHYS_ADDR + 0x008000000,
+ PCMCIA_IO_PHYS_ADDR + 0x008010000 - 1,
AU1550_GPIO201_205_INT,
AU1550_GPIO1_INT,
0,
late_initcall(db1x_poweroff_setup);
/* register a pcmcia socket */
-int __init db1x_register_pcmcia_socket(unsigned long pseudo_attr_start,
- unsigned long pseudo_attr_end,
- unsigned long pseudo_mem_start,
- unsigned long pseudo_mem_end,
- unsigned long pseudo_io_start,
- unsigned long pseudo_io_end,
+int __init db1x_register_pcmcia_socket(phys_addr_t pcmcia_attr_start,
+ phys_addr_t pcmcia_attr_end,
+ phys_addr_t pcmcia_mem_start,
+ phys_addr_t pcmcia_mem_end,
+ phys_addr_t pcmcia_io_start,
+ phys_addr_t pcmcia_io_end,
int card_irq,
int cd_irq,
int stschg_irq,
goto out;
}
- sr[0].name = "pseudo-attr";
+ sr[0].name = "pcmcia-attr";
sr[0].flags = IORESOURCE_MEM;
- sr[0].start = pseudo_attr_start;
- sr[0].end = pseudo_attr_end;
+ sr[0].start = pcmcia_attr_start;
+ sr[0].end = pcmcia_attr_end;
- sr[1].name = "pseudo-mem";
+ sr[1].name = "pcmcia-mem";
sr[1].flags = IORESOURCE_MEM;
- sr[1].start = pseudo_mem_start;
- sr[1].end = pseudo_mem_end;
+ sr[1].start = pcmcia_mem_start;
+ sr[1].end = pcmcia_mem_end;
- sr[2].name = "pseudo-io";
+ sr[2].name = "pcmcia-io";
sr[2].flags = IORESOURCE_MEM;
- sr[2].start = pseudo_io_start;
- sr[2].end = pseudo_io_end;
+ sr[2].start = pcmcia_io_start;
+ sr[2].end = pcmcia_io_end;
sr[3].name = "insert";
sr[3].flags = IORESOURCE_IRQ;
i = 5;
if (stschg_irq) {
- sr[i].name = "insert";
+ sr[i].name = "stschg";
sr[i].flags = IORESOURCE_IRQ;
- sr[i].start = sr[i].end = cd_irq;
+ sr[i].start = sr[i].end = stschg_irq;
i++;
}
if (eject_irq) {
#include <linux/init.h>
-int __init db1x_register_pcmcia_socket(unsigned long pseudo_attr_start,
- unsigned long pseudo_attr_len,
- unsigned long pseudo_mem_start,
- unsigned long pseudo_mem_end,
- unsigned long pseudo_io_start,
- unsigned long pseudo_io_end,
+int __init db1x_register_pcmcia_socket(phys_addr_t pcmcia_attr_start,
+ phys_addr_t pcmcia_attr_len,
+ phys_addr_t pcmcia_mem_start,
+ phys_addr_t pcmcia_mem_end,
+ phys_addr_t pcmcia_io_start,
+ phys_addr_t pcmcia_io_end,
int card_irq,
int cd_irq,
int stschg_irq,
static struct resource xxs1500_pcmcia_res[] = {
{
- .name = "pseudo-io",
+ .name = "pcmcia-io",
.flags = IORESOURCE_MEM,
- .start = PCMCIA_IO_PSEUDO_PHYS,
- .end = PCMCIA_IO_PSEUDO_PHYS + 0x00040000 - 1,
+ .start = PCMCIA_IO_PHYS_ADDR,
+ .end = PCMCIA_IO_PHYS_ADDR + 0x000400000 - 1,
},
{
- .name = "pseudo-attr",
+ .name = "pcmcia-attr",
.flags = IORESOURCE_MEM,
- .start = PCMCIA_ATTR_PSEUDO_PHYS,
- .end = PCMCIA_ATTR_PSEUDO_PHYS + 0x00040000 - 1,
+ .start = PCMCIA_ATTR_PHYS_ADDR,
+ .end = PCMCIA_ATTR_PHYS_ADDR + 0x000400000 - 1,
},
{
- .name = "pseudo-mem",
+ .name = "pcmcia-mem",
.flags = IORESOURCE_MEM,
- .start = PCMCIA_IO_PSEUDO_PHYS,
- .end = PCMCIA_IO_PSEUDO_PHYS + 0x00040000 - 1,
+ .start = PCMCIA_MEM_PHYS_ADDR,
+ .end = PCMCIA_MEM_PHYS_ADDR + 0x000400000 - 1,
},
};
#endif
-/*
- * All Au1xx0 SOCs have a PCMCIA controller.
- * We setup our 32-bit pseudo addresses to be equal to the
- * 36-bit addr >> 4, to make it easier to check the address
- * and fix it.
- * The PCMCIA socket 0 physical attribute address is 0xF 4000 0000.
- * The pseudo address we use is 0xF400 0000. Any address over
- * 0xF400 0000 is a PCMCIA pseudo address.
- */
-#define PCMCIA_IO_PSEUDO_PHYS (PCMCIA_IO_PHYS_ADDR >> 4)
-#define PCMCIA_ATTR_PSEUDO_PHYS (PCMCIA_ATTR_PHYS_ADDR >> 4)
-#define PCMCIA_MEM_PSEUDO_PHYS (PCMCIA_MEM_PHYS_ADDR >> 4)
-#define PCMCIA_PSEUDO_END (0xffffffff)
-
#endif
#include <linux/types.h>
-#ifdef CONFIG_64BIT_PHYS_ADDR
+#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_PCI)
extern phys_t __fixup_bigphys_addr(phys_t, phys_t);
#else
static inline phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
skt->virt_io = (void *)
(ioremap((phys_t)AU1X_SOCK0_IO, 0x1000) -
(u32)mips_io_port_base);
- skt->phys_attr = AU1X_SOCK0_PSEUDO_PHYS_ATTR;
- skt->phys_mem = AU1X_SOCK0_PSEUDO_PHYS_MEM;
+ skt->phys_attr = AU1X_SOCK0_PHYS_ATTR;
+ skt->phys_mem = AU1X_SOCK0_PHYS_MEM;
}
-#ifndef CONFIG_MIPS_XXS1500
else {
skt->virt_io = (void *)
(ioremap((phys_t)AU1X_SOCK1_IO, 0x1000) -
(u32)mips_io_port_base);
- skt->phys_attr = AU1X_SOCK1_PSEUDO_PHYS_ATTR;
- skt->phys_mem = AU1X_SOCK1_PSEUDO_PHYS_MEM;
+ skt->phys_attr = AU1X_SOCK1_PHYS_ATTR;
+ skt->phys_mem = AU1X_SOCK1_PHYS_MEM;
}
-#endif
pcmcia_base_vaddrs[i] = (u32 *)skt->virt_io;
ret = ops->hw_init(skt);
#define AU1X_SOCK0_IO 0xF00000000ULL
#define AU1X_SOCK0_PHYS_ATTR 0xF40000000ULL
#define AU1X_SOCK0_PHYS_MEM 0xF80000000ULL
-/* pseudo 32 bit phys addresses, which get fixed up to the
- * real 36 bit address in fixup_bigphys_addr() */
-#define AU1X_SOCK0_PSEUDO_PHYS_ATTR 0xF4000000
-#define AU1X_SOCK0_PSEUDO_PHYS_MEM 0xF8000000
/* pcmcia socket 1 needs external glue logic so the memory map
* differs from board to board.
#define AU1X_SOCK1_IO 0xF08000000ULL
#define AU1X_SOCK1_PHYS_ATTR 0xF48000000ULL
#define AU1X_SOCK1_PHYS_MEM 0xF88000000ULL
-#define AU1X_SOCK1_PSEUDO_PHYS_ATTR 0xF4800000
-#define AU1X_SOCK1_PSEUDO_PHYS_MEM 0xF8800000
#endif
struct pcmcia_state {
void *virt_io;
/* the "pseudo" addresses of the PCMCIA space. */
- unsigned long phys_io;
- unsigned long phys_attr;
- unsigned long phys_mem;
+ phys_addr_t phys_io;
+ phys_addr_t phys_attr;
+ phys_addr_t phys_mem;
/* previous flags for set_socket() */
unsigned int old_flags;
{
struct db1x_pcmcia_sock *sock;
struct resource *r;
- phys_t physio;
int ret, bid;
sock = kzalloc(sizeof(struct db1x_pcmcia_sock), GFP_KERNEL);
* for this socket (usually the 36bit address shifted 4 to the
* right).
*/
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-attr");
+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-attr");
if (!r) {
printk(KERN_ERR "pcmcia%d has no 'pseudo-attr' resource!\n",
sock->nr);
* pseudo-mem: The 32bit address of the PCMCIA memory space for
* this socket (usually the 36bit address shifted 4 to the right)
*/
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-mem");
+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-mem");
if (!r) {
printk(KERN_ERR "pcmcia%d has no 'pseudo-mem' resource!\n",
sock->nr);
* pseudo-io: The 32bit address of the PCMCIA IO space for this
* socket (usually the 36bit address shifted 4 to the right).
*/
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-io");
+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-io");
if (!r) {
printk(KERN_ERR "pcmcia%d has no 'pseudo-io' resource!\n",
sock->nr);
}
sock->phys_io = r->start;
-
- /* IO: we must remap the full 36bit address (for reference see
- * alchemy/common/setup.c::__fixup_bigphys_addr())
- */
- physio = ((phys_t)sock->phys_io) << 4;
-
/*
* PCMCIA client drivers use the inb/outb macros to access
* the IO registers. Since mips_io_port_base is added
* to access the I/O or MEM address directly, without
* going through this "mips_io_port_base" mechanism.
*/
- sock->virt_io = (void *)(ioremap(physio, IO_MAP_SIZE) -
+ sock->virt_io = (void *)(ioremap(sock->phys_io, IO_MAP_SIZE) -
mips_io_port_base);
if (!sock->virt_io) {
goto out2;
}
- printk(KERN_INFO "Alchemy Db/Pb1xxx pcmcia%d @ io/attr/mem %08lx"
- "(%p) %08lx %08lx card/insert/stschg/eject irqs @ %d "
+ printk(KERN_INFO "Alchemy Db/Pb1xxx pcmcia%d @ io/attr/mem %09llx"
+ "(%p) %09llx %09llx card/insert/stschg/eject irqs @ %d "
"%d %d %d\n", sock->nr, sock->phys_io, sock->virt_io,
sock->phys_attr, sock->phys_mem, sock->card_irq,
sock->insert_irq, sock->stschg_irq, sock->eject_irq);
struct pcmcia_socket socket;
void *virt_io;
- /* the "pseudo" addresses of the PCMCIA space. */
- unsigned long phys_io;
- unsigned long phys_attr;
- unsigned long phys_mem;
+ phys_addr_t phys_io;
+ phys_addr_t phys_attr;
+ phys_addr_t phys_mem;
/* previous flags for set_socket() */
unsigned int old_flags;
{
struct xxs1500_pcmcia_sock *sock;
struct resource *r;
- phys_t physio;
int ret, irq;
sock = kzalloc(sizeof(struct xxs1500_pcmcia_sock), GFP_KERNEL);
* for this socket (usually the 36bit address shifted 4 to the
* right).
*/
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-attr");
+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-attr");
if (!r) {
- dev_err(&pdev->dev, "missing 'pseudo-attr' resource!\n");
+ dev_err(&pdev->dev, "missing 'pcmcia-attr' resource!\n");
goto out0;
}
sock->phys_attr = r->start;
* pseudo-mem: The 32bit address of the PCMCIA memory space for
* this socket (usually the 36bit address shifted 4 to the right)
*/
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-mem");
+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-mem");
if (!r) {
- dev_err(&pdev->dev, "missing 'pseudo-mem' resource!\n");
+ dev_err(&pdev->dev, "missing 'pcmcia-mem' resource!\n");
goto out0;
}
sock->phys_mem = r->start;
* pseudo-io: The 32bit address of the PCMCIA IO space for this
* socket (usually the 36bit address shifted 4 to the right).
*/
- r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pseudo-io");
+ r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pcmcia-io");
if (!r) {
- dev_err(&pdev->dev, "missing 'pseudo-io' resource!\n");
+ dev_err(&pdev->dev, "missing 'pcmcia-io' resource!\n");
goto out0;
}
sock->phys_io = r->start;
- /* for io must remap the full 36bit address (for reference see
- * alchemy/common/setup.c::__fixup_bigphys_addr)
- */
- physio = ((phys_t)sock->phys_io) << 4;
-
/*
* PCMCIA client drivers use the inb/outb macros to access
* the IO registers. Since mips_io_port_base is added
* to access the I/O or MEM address directly, without
* going through this "mips_io_port_base" mechanism.
*/
- sock->virt_io = (void *)(ioremap(physio, IO_MAP_SIZE) -
+ sock->virt_io = (void *)(ioremap(sock->phys_io, IO_MAP_SIZE) -
mips_io_port_base);
if (!sock->virt_io) {