]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
goldfish: add support for 64bit to the virtual bus
authorOctavian Purdila <octavian.purdila@intel.com>
Mon, 12 May 2014 15:55:05 +0000 (16:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 May 2014 20:19:00 +0000 (13:19 -0700)
This patchs adds a new register to pass the upper 32bits for the
device name address when running in 64bit mode.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Jun Tian <jun.j.tian@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/goldfish/pdev_bus.c

index 4eb2bb34790d250a7054cc841adb2019eb892249..eb254400c44a3ba4058fca723c6a8f4ef7ec7886 100644 (file)
@@ -36,6 +36,7 @@
 #define PDEV_BUS_IO_SIZE        (0x14)
 #define PDEV_BUS_IRQ            (0x18)
 #define PDEV_BUS_IRQ_COUNT      (0x1c)
+#define PDEV_BUS_GET_NAME_HIGH  (0x20)
 
 struct pdev_bus_dev {
        struct list_head list;
@@ -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 = ~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';
        dev->pdev.id = readl(pdev_bus_base + PDEV_BUS_ID);
        dev->pdev.resource[0].start = base;