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

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

ARM: convert PCI defines to variables



Convert PCIBIOS_MIN_IO and PCIBIOS_MIN_MEM to variables to allow
multi-platform builds. This also removes the requirement for a platform to
have a mach/hardware.h.

The default values for i/o and mem are 0x1000 and 0x01000000, respectively.
Per Arnd Bergmann, other values are likely to be incorrect, but this commit
does not try to address that issue.

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 dc8d966b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -6,7 +6,11 @@
#include <asm-generic/pci-bridge.h>

#include <asm/mach/pci.h> /* for pci_sys_data */
#include <mach/hardware.h> /* for PCIBIOS_MIN_* */

extern unsigned long pcibios_min_io;
#define PCIBIOS_MIN_IO pcibios_min_io
extern unsigned long pcibios_min_mem;
#define PCIBIOS_MIN_MEM pcibios_min_mem

static inline int pcibios_assign_all_busses(void)
{
+0 −21
Original line number Diff line number Diff line
/*
 * This file contains the hardware definitions of the Cavium Networks boards.
 *
 * Copyright 2003 ARM Limited.
 * Copyright 2008 Cavium Networks
 *
 * This file is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License, Version 2, as
 * published by the Free Software Foundation.
 */

#ifndef __MACH_HARDWARE_H
#define __MACH_HARDWARE_H

#include <asm/sizes.h>

/* macro to get at IO space when running virtually */
#define PCIBIOS_MIN_IO		0x00000000
#define PCIBIOS_MIN_MEM		0x00000000

#endif
+3 −0
Original line number Diff line number Diff line
@@ -369,6 +369,9 @@ static int __init cns3xxx_pcie_init(void)
{
	int i;

	pcibios_min_io = 0;
	pcibios_min_mem = 0;

	hook_fault_code(16 + 6, cns3xxx_pcie_abort_handler, SIGBUS, 0,
			"imprecise external abort");

+0 −2
Original line number Diff line number Diff line
@@ -11,8 +11,6 @@

#include "dove.h"

#define PCIBIOS_MIN_IO			0x1000
#define PCIBIOS_MIN_MEM			0x01000000
#define PCIMEM_BASE			DOVE_PCIE0_MEM_PHYS_BASE


+2 −0
Original line number Diff line number Diff line
@@ -295,6 +295,8 @@ void __init dc21285_preinit(void)
	unsigned int mem_size, mem_mask;
	int cfn_mode;

	pcibios_min_mem = 0x81000000;

	mem_size = (unsigned int)high_memory - PAGE_OFFSET;
	for (mem_mask = 0x00100000; mem_mask < 0x10000000; mem_mask <<= 1)
		if (mem_mask >= mem_size)
Loading