Commit f10d8434 authored by Octavian Purdila's avatar Octavian Purdila Committed by Greg Kroah-Hartman

goldfish: add support for 64bit to the virtual bus

This patchs adds a new register to pass the upper 32bits for the
device name address when running in 64bit mode.
Signed-off-by: default avatarOctavian Purdila <octavian.purdila@intel.com>
Signed-off-by: default avatarJun Tian <jun.j.tian@intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 25c72c78
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#define PDEV_BUS_IO_SIZE (0x14) #define PDEV_BUS_IO_SIZE (0x14)
#define PDEV_BUS_IRQ (0x18) #define PDEV_BUS_IRQ (0x18)
#define PDEV_BUS_IRQ_COUNT (0x1c) #define PDEV_BUS_IRQ_COUNT (0x1c)
#define PDEV_BUS_GET_NAME_HIGH (0x20)
struct pdev_bus_dev { struct pdev_bus_dev {
struct list_head list; struct list_head list;
...@@ -129,7 +130,10 @@ static int goldfish_new_pdev(void) ...@@ -129,7 +130,10 @@ static int goldfish_new_pdev(void)
dev->pdev.dev.dma_mask = (void *)(dev->pdev.name + name_len + 1); dev->pdev.dev.dma_mask = (void *)(dev->pdev.name + name_len + 1);
*dev->pdev.dev.dma_mask = ~0; *dev->pdev.dev.dma_mask = ~0;
writel((unsigned long)name, pdev_bus_base + PDEV_BUS_GET_NAME); #ifdef CONFIG_64BIT
writel((u32)((u64)name>>32), pdev_bus_base + PDEV_BUS_GET_NAME_HIGH);
#endif
writel((u32)(u64)name, pdev_bus_base + PDEV_BUS_GET_NAME);
name[name_len] = '\0'; name[name_len] = '\0';
dev->pdev.id = readl(pdev_bus_base + PDEV_BUS_ID); dev->pdev.id = readl(pdev_bus_base + PDEV_BUS_ID);
dev->pdev.resource[0].start = base; dev->pdev.resource[0].start = base;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment