Skip to content

Commit

Permalink
Merge branch 'next/cross-platform' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/kernel/git/arm/linux-arm-soc

* 'next/cross-platform' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc:
  ARM: Consolidate the clkdev header files
  ARM: set vga memory base at run-time
  ARM: convert PCI defines to variables
  ARM: pci: make pcibios_assign_all_busses use pci_has_flag
  ARM: remove unnecessary mach/hardware.h includes
  pci: move microblaze and powerpc pci flag functions into asm-generic
  powerpc: rename ppc_pci_*_flags to pci_*_flags

Fix up conflicts in arch/microblaze/include/asm/pci-bridge.h
  • Loading branch information
torvalds committed Jul 27, 2011
2 parents 62c9072 + c8f8552 commit 3960ef3
Show file tree
Hide file tree
Showing 98 changed files with 212 additions and 577 deletions.
6 changes: 6 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ config ARCH_INTEGRATOR
select ARM_AMBA
select ARCH_HAS_CPUFREQ
select CLKDEV_LOOKUP
select HAVE_MACH_CLKDEV
select ICST
select GENERIC_CLOCKEVENTS
select PLAT_VERSATILE
Expand All @@ -253,6 +254,7 @@ config ARCH_REALVIEW
bool "ARM Ltd. RealView family"
select ARM_AMBA
select CLKDEV_LOOKUP
select HAVE_MACH_CLKDEV
select ICST
select GENERIC_CLOCKEVENTS
select ARCH_WANT_OPTIONAL_GPIOLIB
Expand All @@ -268,6 +270,7 @@ config ARCH_VERSATILE
select ARM_AMBA
select ARM_VIC
select CLKDEV_LOOKUP
select HAVE_MACH_CLKDEV
select ICST
select GENERIC_CLOCKEVENTS
select ARCH_WANT_OPTIONAL_GPIOLIB
Expand All @@ -284,6 +287,7 @@ config ARCH_VEXPRESS
select ARM_AMBA
select ARM_TIMER_SP804
select CLKDEV_LOOKUP
select HAVE_MACH_CLKDEV
select GENERIC_CLOCKEVENTS
select HAVE_CLK
select HAVE_PATA_PLATFORM
Expand Down Expand Up @@ -646,6 +650,7 @@ config ARCH_SHMOBILE
bool "Renesas SH-Mobile / R-Mobile"
select HAVE_CLK
select CLKDEV_LOOKUP
select HAVE_MACH_CLKDEV
select GENERIC_CLOCKEVENTS
select NO_IOPORT
select SPARSE_IRQ
Expand Down Expand Up @@ -825,6 +830,7 @@ config ARCH_U300
select ARM_VIC
select GENERIC_CLOCKEVENTS
select CLKDEV_LOOKUP
select HAVE_MACH_CLKDEV
select GENERIC_GPIO
help
Support for ST-Ericsson U300 series mobile platforms.
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/include/asm/clkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@

#include <linux/slab.h>

#ifdef CONFIG_HAVE_MACH_CLKDEV
#include <mach/clkdev.h>
#else
#define __clk_get(clk) ({ 1; })
#define __clk_put(clk) do { } while (0)
#endif

static inline struct clk_lookup_alloc *__clkdev_alloc(size_t size)
{
Expand Down
12 changes: 11 additions & 1 deletion arch/arm/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@

#ifdef __KERNEL__
#include <asm-generic/pci-dma-compat.h>
#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)
{
return pci_has_flag(PCI_REASSIGN_ALL_RSRC);
}

#ifdef CONFIG_PCI_DOMAINS
static inline int pci_domain_nr(struct pci_bus *bus)
Expand Down
5 changes: 3 additions & 2 deletions arch/arm/include/asm/vga.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 0 additions & 1 deletion arch/arm/lib/ecard.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
#include <linux/linkage.h>
#include <asm/assembler.h>
#include <mach/hardware.h>

#define CPSR2SPSR(rt) \
mrs rt, cpsr; \
Expand Down
1 change: 0 additions & 1 deletion arch/arm/lib/io-readsw-armv3.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
#include <linux/linkage.h>
#include <asm/assembler.h>
#include <mach/hardware.h>

.Linsw_bad_alignment:
adr r0, .Linsw_bad_align_msg
Expand Down
1 change: 0 additions & 1 deletion arch/arm/lib/io-writesw-armv3.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
#include <linux/linkage.h>
#include <asm/assembler.h>
#include <mach/hardware.h>

.Loutsw_bad_alignment:
adr r0, .Loutsw_bad_align_msg
Expand Down
7 changes: 0 additions & 7 deletions arch/arm/mach-at91/include/mach/clkdev.h

This file was deleted.

7 changes: 0 additions & 7 deletions arch/arm/mach-bcmring/include/mach/clkdev.h

This file was deleted.

2 changes: 0 additions & 2 deletions arch/arm/mach-bcmring/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#define RAM_SIZE (CFG_GLOBAL_RAM_SIZE-CFG_GLOBAL_RAM_SIZE_RESERVED)
#define RAM_BASE PAGE_OFFSET

#define pcibios_assign_all_busses() 1

/* Macros to make managing spinlocks a bit more controlled in terms of naming. */
/* See reg_gpio.h, reg_irq.h, arch.c, gpio.c for example usage. */
#if defined(__KERNEL__)
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-cns3xxx/cns3420vb.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <asm/mach/time.h>
#include <mach/hardware.h>
#include <mach/cns3xxx.h>
#include <mach/irqs.h>
#include "core.h"
Expand Down
22 changes: 0 additions & 22 deletions arch/arm/mach-cns3xxx/include/mach/hardware.h

This file was deleted.

3 changes: 3 additions & 0 deletions arch/arm/mach-cns3xxx/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
15 changes: 0 additions & 15 deletions arch/arm/mach-davinci/include/mach/clkdev.h

This file was deleted.

7 changes: 0 additions & 7 deletions arch/arm/mach-dove/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@

#include "dove.h"

#define pcibios_assign_all_busses() 1

#define PCIBIOS_MIN_IO 0x1000
#define PCIBIOS_MIN_MEM 0x01000000
#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)))
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-dove/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);

Expand Down
11 changes: 0 additions & 11 deletions arch/arm/mach-ep93xx/include/mach/clkdev.h

This file was deleted.

2 changes: 0 additions & 2 deletions arch/arm/mach-ep93xx/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
#include <mach/ep93xx-regs.h>
#include <mach/platform.h>

#define pcibios_assign_all_busses() 0

/*
* The EP93xx has two external crystal oscillators. To generate the
* required high-frequency clocks, the processor uses two phase-locked-
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/mach-footbridge/dc21285.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ void __init dc21285_preinit(void)
unsigned int mem_size, mem_mask;
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)
if (mem_mask >= mem_size)
Expand Down
5 changes: 0 additions & 5 deletions arch/arm/mach-footbridge/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,4 @@ extern unsigned int nw_gpio_read(void);
extern void nw_cpld_modify(unsigned int mask, unsigned int set);
#endif

#define pcibios_assign_all_busses() 1

#define PCIBIOS_MIN_IO 0x1000
#define PCIBIOS_MIN_MEM 0x81000000

#endif
7 changes: 0 additions & 7 deletions arch/arm/mach-integrator/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@
#define IO_SIZE 0x0B000000 // How much?
#define IO_START INTEGRATOR_HDR_BASE // PA of IO

#define PCIMEM_BASE PCI_MEMORY_VADDR

#define pcibios_assign_all_busses() 1

#define PCIBIOS_MIN_IO 0x6000
#define PCIBIOS_MIN_MEM 0x00100000

/* macro to get at IO space when running virtually */
#ifdef CONFIG_MMU
#define IO_ADDRESS(x) (((x) & 0x000fffff) | (((x) >> 4) & 0x0ff00000) | IO_BASE)
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/mach-integrator/pci_v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/spinlock.h>
#include <linux/init.h>
#include <linux/io.h>
#include <video/vga.h>

#include <mach/hardware.h>
#include <mach/platform.h>
Expand Down Expand Up @@ -502,6 +503,10 @@ void __init pci_v3_preinit(void)
unsigned int temp;
int ret;

pcibios_min_io = 0x6000;
pcibios_min_mem = 0x00100000;
vga_base = PCI_MEMORY_VADDR;

/*
* Hook in our fault handler for PCI errors
*/
Expand Down
7 changes: 0 additions & 7 deletions arch/arm/mach-iop13xx/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@
#define __ASM_ARCH_HARDWARE_H
#include <asm/types.h>

#define pcibios_assign_all_busses() 1

#ifndef __ASSEMBLY__
extern unsigned long iop13xx_pcibios_min_io;
extern unsigned long iop13xx_pcibios_min_mem;
extern u16 iop13xx_dev_id(void);
extern void iop13xx_set_atu_mmr_bases(void);
#endif

#define PCIBIOS_MIN_IO (iop13xx_pcibios_min_io)
#define PCIBIOS_MIN_MEM (iop13xx_pcibios_min_mem)

/*
* Generic chipset bits
*
Expand Down
5 changes: 2 additions & 3 deletions arch/arm/mach-iop13xx/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ u32 iop13xx_atue_mem_base;
u32 iop13xx_atux_mem_base;
size_t iop13xx_atue_mem_size;
size_t iop13xx_atux_mem_size;
unsigned long iop13xx_pcibios_min_io = 0;
unsigned long iop13xx_pcibios_min_mem = 0;

EXPORT_SYMBOL(iop13xx_atue_mem_base);
EXPORT_SYMBOL(iop13xx_atux_mem_base);
Expand Down Expand Up @@ -971,7 +969,8 @@ void __init iop13xx_pci_init(void)
__raw_writel(__raw_readl(IOP13XX_XBG_BECSR) & 3, IOP13XX_XBG_BECSR);

/* Setup the Min Address for PCI memory... */
iop13xx_pcibios_min_mem = IOP13XX_PCIX_LOWER_MEM_BA;
pcibios_min_io = 0;
pcibios_min_mem = IOP13XX_PCIX_LOWER_MEM_BA;

/* if Linux is given control of an ATU
* clear out its prior configuration,
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-iop32x/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
* but when we read them, we convert them to virtual addresses. See
* arch/arm/plat-iop/pci.c.
*/
#define pcibios_assign_all_busses() 1
#define PCIBIOS_MIN_IO 0x00000000
#define PCIBIOS_MIN_MEM 0x00000000

#ifndef __ASSEMBLY__
void iop32x_init_irq(void);
Expand Down
3 changes: 0 additions & 3 deletions arch/arm/mach-iop33x/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
* but when we read them, we convert them to virtual addresses. See
* arch/arm/mach-iop3xx/iop3xx-pci.c
*/
#define pcibios_assign_all_busses() 1
#define PCIBIOS_MIN_IO 0x00000000
#define PCIBIOS_MIN_MEM 0x00000000

#ifndef __ASSEMBLY__
void iop33x_init_irq(void);
Expand Down
8 changes: 0 additions & 8 deletions arch/arm/mach-ixp2000/include/mach/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,8 @@
#ifndef __ASM_ARCH_HARDWARE_H__
#define __ASM_ARCH_HARDWARE_H__

/*
* This needs to be platform-specific?
*/
#define PCIBIOS_MIN_IO 0x00000000
#define PCIBIOS_MIN_MEM 0x00000000

#include "ixp2000-regs.h" /* Chipset Registers */

#define pcibios_assign_all_busses() 0

/*
* Platform helper functions
*/
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/mach-ixp2000/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ clear_master_aborts(void)
void __init
ixp2000_pci_preinit(void)
{
pci_set_flags(0);

pcibios_min_io = 0;
pcibios_min_mem = 0;

#ifndef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO
/*
* Configure the PCI unit to properly byteswap I/O transactions,
Expand Down
Loading

0 comments on commit 3960ef3

Please sign in to comment.