From dc8d966bccde0b8b6c9e8c6e663c747030c17435 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 29 Jun 2011 10:59:45 -0500 Subject: ARM: pci: make pcibios_assign_all_busses use pci_has_flag Convert pcibios_assign_all_busses from a define to inline so platforms can control this setting. Signed-off-by: Rob Herring Acked-by: Nicolas Pitre Reviewed-by: Arnd Bergmann --- arch/arm/include/asm/pci.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/arm/include') diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h index 92e2a833693d..cb77e66c969f 100644 --- a/arch/arm/include/asm/pci.h +++ b/arch/arm/include/asm/pci.h @@ -3,10 +3,16 @@ #ifdef __KERNEL__ #include +#include #include /* for pci_sys_data */ #include /* for PCIBIOS_MIN_* */ +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) { -- cgit v1.2.3 From c9d95fbe59e426eed7f16e7cac812e46ac4772d0 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 28 Jun 2011 21:16:13 -0500 Subject: 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: Rob Herring Acked-by: Nicolas Pitre Reviewed-by: Arnd Bergmann --- arch/arm/include/asm/pci.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'arch/arm/include') diff --git a/arch/arm/include/asm/pci.h b/arch/arm/include/asm/pci.h index cb77e66c969f..2b1f245db0c6 100644 --- a/arch/arm/include/asm/pci.h +++ b/arch/arm/include/asm/pci.h @@ -6,7 +6,11 @@ #include #include /* for pci_sys_data */ -#include /* 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) { -- cgit v1.2.3 From cc22b4c18540e5e8bf55c7d124044f9317527d3c Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 28 Jun 2011 21:22:40 -0500 Subject: 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: Rob Herring Acked-by: Nicolas Pitre Reviewed-by: Arnd Bergmann --- arch/arm/include/asm/vga.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/arm/include') diff --git a/arch/arm/include/asm/vga.h b/arch/arm/include/asm/vga.h index 250a4dd00630..91f40217bfa5 100644 --- a/arch/arm/include/asm/vga.h +++ b/arch/arm/include/asm/vga.h @@ -2,9 +2,10 @@ #define ASMARM_VGA_H #include -#include -#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)) -- cgit v1.2.3 From aa3831cf9d29cfeaebd8c2169378b74111364487 Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Mon, 18 Jul 2011 16:34:54 +0900 Subject: ARM: Consolidate the clkdev header files Now most of ARM machines has the alsmot same __clk_get/put() macro So place it at the arch/arm/include/asm/clkdev.h and remove the reduntant header files But some machines don't have the same form as above. It can use the machince specific clkdev file by HAVE_MACH_CLKDEV config Now there are only 3 caese. 1) define the clk structure with clkdev macro => Need to move clk structure to proper header file arch/arm/mach-versatile/include/mach/clkdev.h arch/arm/mach-realview/include/mach/clkdev.h arch/arm/mach-vexpress/include/mach/clkdev.h arch/arm/mach-integrator/include/mach/clkdev.h 2) export the __clk_get/put function at clock.c arch/arm/mach-shmobile/include/mach/clkdev.h 3) demuxing the clk source arch/arm/mach-u300/include/mach/clkdev.h Acked-by: Viresh Kumar Acked-by: H Hartley Sweeten Acked-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Kyungmin Park --- arch/arm/include/asm/clkdev.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/include') diff --git a/arch/arm/include/asm/clkdev.h b/arch/arm/include/asm/clkdev.h index 765d33222369..80751c15c300 100644 --- a/arch/arm/include/asm/clkdev.h +++ b/arch/arm/include/asm/clkdev.h @@ -14,7 +14,12 @@ #include +#ifdef CONFIG_HAVE_MACH_CLKDEV #include +#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) { -- cgit v1.2.3