Commit f650caaa authored by Dmitry Eremin-Solenikov's avatar Dmitry Eremin-Solenikov Committed by Greg Kroah-Hartman

staging/xgifb: fix addressing issues on platform with long physical addressing

Some platforms (e.g. ppc460ex) have 36-bit physical addressing, while
sizeof(unsigned long) == 4. Adapt xgifb driver to use phys_addr_t for
physical address variables instead of unsigned long.
Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9a801f25
...@@ -1910,8 +1910,8 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -1910,8 +1910,8 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
xgifb_info->mmio_base = pci_resource_start(pdev, 1); xgifb_info->mmio_base = pci_resource_start(pdev, 1);
xgifb_info->mmio_size = pci_resource_len(pdev, 1); xgifb_info->mmio_size = pci_resource_len(pdev, 1);
xgifb_info->vga_base = pci_resource_start(pdev, 2) + 0x30; xgifb_info->vga_base = pci_resource_start(pdev, 2) + 0x30;
pr_info("Relocate IO address: %lx [%08lx]\n", pr_info("Relocate IO address: %Lx [%08lx]\n",
(unsigned long)pci_resource_start(pdev, 2), (u64) pci_resource_start(pdev, 2),
xgifb_info->vga_base); xgifb_info->vga_base);
if (pci_enable_device(pdev)) { if (pci_enable_device(pdev)) {
...@@ -2003,13 +2003,13 @@ static int __devinit xgifb_probe(struct pci_dev *pdev, ...@@ -2003,13 +2003,13 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
xgifb_info->mmio_vbase = ioremap(xgifb_info->mmio_base, xgifb_info->mmio_vbase = ioremap(xgifb_info->mmio_base,
xgifb_info->mmio_size); xgifb_info->mmio_size);
pr_info("Framebuffer at 0x%lx, mapped to 0x%p, size %dk\n", pr_info("Framebuffer at 0x%Lx, mapped to 0x%p, size %dk\n",
xgifb_info->video_base, (u64) xgifb_info->video_base,
xgifb_info->video_vbase, xgifb_info->video_vbase,
xgifb_info->video_size / 1024); xgifb_info->video_size / 1024);
pr_info("MMIO at 0x%lx, mapped to 0x%p, size %ldk\n", pr_info("MMIO at 0x%Lx, mapped to 0x%p, size %ldk\n",
xgifb_info->mmio_base, xgifb_info->mmio_vbase, (u64) xgifb_info->mmio_base, xgifb_info->mmio_vbase,
xgifb_info->mmio_size / 1024); xgifb_info->mmio_size / 1024);
pci_set_drvdata(pdev, xgifb_info); pci_set_drvdata(pdev, xgifb_info);
......
...@@ -66,9 +66,9 @@ struct xgifb_video_info { ...@@ -66,9 +66,9 @@ struct xgifb_video_info {
int chip_id; int chip_id;
unsigned int video_size; unsigned int video_size;
unsigned long video_base; phys_addr_t video_base;
void __iomem *video_vbase; void __iomem *video_vbase;
unsigned long mmio_base; phys_addr_t mmio_base;
unsigned long mmio_size; unsigned long mmio_size;
void __iomem *mmio_vbase; void __iomem *mmio_vbase;
unsigned long vga_base; unsigned long vga_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