Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc22b4c1 authored by Rob Herring's avatar Rob Herring
Browse files

ARM: set vga memory base at run-time



Convert the incorrectly named PCIMEM_BASE to a variable called vga_base.
This removes the dependency on mach/hardware.h.

Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
Acked-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
Reviewed-by: default avatarArnd Bergmann <arnd@arndb.de>
parent c9d95fbe
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2,9 +2,10 @@
#define ASMARM_VGA_H

#include <linux/io.h>
#include <mach/hardware.h>

#define VGA_MAP_MEM(x,s)	(PCIMEM_BASE + (x))
extern unsigned long vga_base;

#define VGA_MAP_MEM(x,s)	(vga_base + (x))

#define vga_readb(x)	(*((volatile unsigned char *)x))
#define vga_writeb(x,y)	(*((volatile unsigned char *)y) = (x))
+0 −3
Original line number Diff line number Diff line
@@ -11,9 +11,6 @@

#include "dove.h"

#define PCIMEM_BASE			DOVE_PCIE0_MEM_PHYS_BASE


/* Macros below are required for compatibility with PXA AC'97 driver.	*/
#define __REG(x)	(*((volatile u32 *)((x) - DOVE_SB_REGS_PHYS_BASE + \
				DOVE_SB_REGS_VIRT_BASE)))
+3 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/mbus.h>
#include <video/vga.h>
#include <asm/mach/pci.h>
#include <asm/mach/arch.h>
#include <asm/setup.h>
@@ -228,6 +229,8 @@ static void __init add_pcie_port(int index, unsigned long base)

void __init dove_pcie_init(int init_port0, int init_port1)
{
	vga_base = DOVE_PCIE0_MEM_PHYS_BASE;

	if (init_port0)
		add_pcie_port(0, DOVE_PCIE0_VIRT_BASE);

+1 −0
Original line number Diff line number Diff line
@@ -296,6 +296,7 @@ void __init dc21285_preinit(void)
	int cfn_mode;

	pcibios_min_mem = 0x81000000;
	vga_base = PCIMEM_BASE;

	mem_size = (unsigned int)high_memory - PAGE_OFFSET;
	for (mem_mask = 0x00100000; mem_mask < 0x10000000; mem_mask <<= 1)
+0 −2
Original line number Diff line number Diff line
@@ -32,8 +32,6 @@
#define IO_SIZE			0x0B000000                 // How much?
#define IO_START		INTEGRATOR_HDR_BASE        // PA of IO

#define PCIMEM_BASE		PCI_MEMORY_VADDR

/* macro to get at IO space when running virtually */
#ifdef CONFIG_MMU
#define IO_ADDRESS(x)	(((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE)
Loading