* [PATCH] ppc/powerpc: Fix io.h for config with CONFIG_PCI not set
@ 2006-11-05 0:17 Sylvain Munaut
2006-11-05 1:12 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Sylvain Munaut @ 2006-11-05 0:17 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Sylvain Munaut, ML PPC Embedded, Sven
When CONFIG_PCI option is not set, the variables
pci_dram_offset, isa_io_base and isa_mem_base are not defined.
Currently, the test is handled in each platform header. This
patch moves the test in io.h once and for all.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
include/asm-powerpc/mpc85xx.h | 8 --------
include/asm-ppc/io.h | 8 +-------
include/asm-ppc/mpc52xx.h | 11 -----------
include/asm-ppc/mpc83xx.h | 8 --------
include/asm-ppc/mpc85xx.h | 8 --------
5 files changed, 1 insertions(+), 42 deletions(-)
diff --git a/include/asm-powerpc/mpc85xx.h b/include/asm-powerpc/mpc85xx.h
index ccdb8a2..5414299 100644
--- a/include/asm-powerpc/mpc85xx.h
+++ b/include/asm-powerpc/mpc85xx.h
@@ -31,14 +31,6 @@ #ifdef CONFIG_MPC85xx_CDS
#include <platforms/85xx/mpc85xx_cds.h>
#endif
-#define _IO_BASE isa_io_base
-#define _ISA_MEM_BASE isa_mem_base
-#ifdef CONFIG_PCI
-#define PCI_DRAM_OFFSET pci_dram_offset
-#else
-#define PCI_DRAM_OFFSET 0
-#endif
-
/* Let modules/drivers get at CCSRBAR */
extern phys_addr_t get_ccsrbar(void);
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index a4c411b..b744baf 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -26,17 +26,11 @@ #define PREP_PCI_DRAM_OFFSET 0x80000000
#if defined(CONFIG_4xx)
#include <asm/ibm4xx.h>
-#elif defined(CONFIG_PPC_MPC52xx)
-#include <asm/mpc52xx.h>
#elif defined(CONFIG_8xx)
#include <asm/mpc8xx.h>
#elif defined(CONFIG_8260)
#include <asm/mpc8260.h>
-#elif defined(CONFIG_83xx)
-#include <asm/mpc83xx.h>
-#elif defined(CONFIG_85xx)
-#include <asm/mpc85xx.h>
-#elif defined(CONFIG_APUS)
+#elif defined(CONFIG_APUS) || !defined(CONFIG_PCI)
#define _IO_BASE 0
#define _ISA_MEM_BASE 0
#define PCI_DRAM_OFFSET 0
diff --git a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
index 64c8874..d9d21aa 100644
--- a/include/asm-ppc/mpc52xx.h
+++ b/include/asm-ppc/mpc52xx.h
@@ -29,17 +29,6 @@ struct pt_regs;
#endif /* __ASSEMBLY__ */
-#ifdef CONFIG_PCI
-#define _IO_BASE isa_io_base
-#define _ISA_MEM_BASE isa_mem_base
-#define PCI_DRAM_OFFSET pci_dram_offset
-#else
-#define _IO_BASE 0
-#define _ISA_MEM_BASE 0
-#define PCI_DRAM_OFFSET 0
-#endif
-
-
/* ======================================================================== */
/* PPC Sys devices definition */
/* ======================================================================== */
diff --git a/include/asm-ppc/mpc83xx.h b/include/asm-ppc/mpc83xx.h
index 02ed2c3..c306197 100644
--- a/include/asm-ppc/mpc83xx.h
+++ b/include/asm-ppc/mpc83xx.h
@@ -25,14 +25,6 @@ #ifdef CONFIG_MPC834x_SYS
#include <platforms/83xx/mpc834x_sys.h>
#endif
-#define _IO_BASE isa_io_base
-#define _ISA_MEM_BASE isa_mem_base
-#ifdef CONFIG_PCI
-#define PCI_DRAM_OFFSET pci_dram_offset
-#else
-#define PCI_DRAM_OFFSET 0
-#endif
-
/*
* The "residual" board information structure the boot loader passes
* into the kernel.
diff --git a/include/asm-ppc/mpc85xx.h b/include/asm-ppc/mpc85xx.h
index 9b48511..d7e4a79 100644
--- a/include/asm-ppc/mpc85xx.h
+++ b/include/asm-ppc/mpc85xx.h
@@ -44,14 +44,6 @@ #if defined(CONFIG_TQM8540) || defined(C
#include <platforms/85xx/tqm85xx.h>
#endif
-#define _IO_BASE isa_io_base
-#define _ISA_MEM_BASE isa_mem_base
-#ifdef CONFIG_PCI
-#define PCI_DRAM_OFFSET pci_dram_offset
-#else
-#define PCI_DRAM_OFFSET 0
-#endif
-
/*
* The "residual" board information structure the boot loader passes
* into the kernel.
--
1.4.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ppc/powerpc: Fix io.h for config with CONFIG_PCI not set
2006-11-05 0:17 Sylvain Munaut
@ 2006-11-05 1:12 ` Benjamin Herrenschmidt
2006-11-05 1:45 ` Sylvain Munaut
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-11-05 1:12 UTC (permalink / raw)
To: Sylvain Munaut; +Cc: ML PPC Embedded, Sven
On Sun, 2006-11-05 at 01:17 +0100, Sylvain Munaut wrote:
> When CONFIG_PCI option is not set, the variables
> pci_dram_offset, isa_io_base and isa_mem_base are not defined.
>
> Currently, the test is handled in each platform header. This
> patch moves the test in io.h once and for all.
Be careful with _IO_BASE... I'm not 100% sure some platforms don't need
it set to something else even when PCI is not present.
Ben.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ppc/powerpc: Fix io.h for config with CONFIG_PCI not set
2006-11-05 1:12 ` Benjamin Herrenschmidt
@ 2006-11-05 1:45 ` Sylvain Munaut
0 siblings, 0 replies; 4+ messages in thread
From: Sylvain Munaut @ 2006-11-05 1:45 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: ML PPC Embedded, Sven
Benjamin Herrenschmidt wrote:
> On Sun, 2006-11-05 at 01:17 +0100, Sylvain Munaut wrote:
>
>> When CONFIG_PCI option is not set, the variables
>> pci_dram_offset, isa_io_base and isa_mem_base are not defined.
>>
>> Currently, the test is handled in each platform header. This
>> patch moves the test in io.h once and for all.
>>
>
> Be careful with _IO_BASE... I'm not 100% sure some platforms don't need
> it set to something else even when PCI is not present.
>
When I saw in mpc83xx.h and mpc85xx.h that they still defined them, I
wondered.
But when looking at the code :
unsigned long isa_io_base = 0;
unsigned long isa_mem_base = 0;
are both defined in pci_{32/64}.c and won't be included if CONFIG_PCI is
not set.
Sylvain
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ppc/powerpc: Fix io.h for config with CONFIG_PCI not set
@ 2006-11-11 9:53 Sylvain Munaut
0 siblings, 0 replies; 4+ messages in thread
From: Sylvain Munaut @ 2006-11-11 9:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Linux PPC dev
When CONFIG_PCI option is not set, the variables
pci_dram_offset, isa_io_base and isa_mem_base are not defined.
Currently, the test is handled in each platform header. This
patch moves the test in io.h once and for all.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
---
include/asm-powerpc/mpc85xx.h | 8 --------
include/asm-ppc/io.h | 8 +-------
include/asm-ppc/mpc52xx.h | 11 -----------
include/asm-ppc/mpc83xx.h | 8 --------
include/asm-ppc/mpc85xx.h | 8 --------
5 files changed, 1 insertions(+), 42 deletions(-)
diff --git a/include/asm-powerpc/mpc85xx.h b/include/asm-powerpc/mpc85xx.h
index ccdb8a2..5414299 100644
--- a/include/asm-powerpc/mpc85xx.h
+++ b/include/asm-powerpc/mpc85xx.h
@@ -31,14 +31,6 @@ #ifdef CONFIG_MPC85xx_CDS
#include <platforms/85xx/mpc85xx_cds.h>
#endif
-#define _IO_BASE isa_io_base
-#define _ISA_MEM_BASE isa_mem_base
-#ifdef CONFIG_PCI
-#define PCI_DRAM_OFFSET pci_dram_offset
-#else
-#define PCI_DRAM_OFFSET 0
-#endif
-
/* Let modules/drivers get at CCSRBAR */
extern phys_addr_t get_ccsrbar(void);
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h
index a4c411b..b744baf 100644
--- a/include/asm-ppc/io.h
+++ b/include/asm-ppc/io.h
@@ -26,17 +26,11 @@ #define PREP_PCI_DRAM_OFFSET 0x80000000
#if defined(CONFIG_4xx)
#include <asm/ibm4xx.h>
-#elif defined(CONFIG_PPC_MPC52xx)
-#include <asm/mpc52xx.h>
#elif defined(CONFIG_8xx)
#include <asm/mpc8xx.h>
#elif defined(CONFIG_8260)
#include <asm/mpc8260.h>
-#elif defined(CONFIG_83xx)
-#include <asm/mpc83xx.h>
-#elif defined(CONFIG_85xx)
-#include <asm/mpc85xx.h>
-#elif defined(CONFIG_APUS)
+#elif defined(CONFIG_APUS) || !defined(CONFIG_PCI)
#define _IO_BASE 0
#define _ISA_MEM_BASE 0
#define PCI_DRAM_OFFSET 0
diff --git a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
index 64c8874..d9d21aa 100644
--- a/include/asm-ppc/mpc52xx.h
+++ b/include/asm-ppc/mpc52xx.h
@@ -29,17 +29,6 @@ struct pt_regs;
#endif /* __ASSEMBLY__ */
-#ifdef CONFIG_PCI
-#define _IO_BASE isa_io_base
-#define _ISA_MEM_BASE isa_mem_base
-#define PCI_DRAM_OFFSET pci_dram_offset
-#else
-#define _IO_BASE 0
-#define _ISA_MEM_BASE 0
-#define PCI_DRAM_OFFSET 0
-#endif
-
-
/* ======================================================================== */
/* PPC Sys devices definition */
/* ======================================================================== */
diff --git a/include/asm-ppc/mpc83xx.h b/include/asm-ppc/mpc83xx.h
index 02ed2c3..c306197 100644
--- a/include/asm-ppc/mpc83xx.h
+++ b/include/asm-ppc/mpc83xx.h
@@ -25,14 +25,6 @@ #ifdef CONFIG_MPC834x_SYS
#include <platforms/83xx/mpc834x_sys.h>
#endif
-#define _IO_BASE isa_io_base
-#define _ISA_MEM_BASE isa_mem_base
-#ifdef CONFIG_PCI
-#define PCI_DRAM_OFFSET pci_dram_offset
-#else
-#define PCI_DRAM_OFFSET 0
-#endif
-
/*
* The "residual" board information structure the boot loader passes
* into the kernel.
diff --git a/include/asm-ppc/mpc85xx.h b/include/asm-ppc/mpc85xx.h
index 9b48511..d7e4a79 100644
--- a/include/asm-ppc/mpc85xx.h
+++ b/include/asm-ppc/mpc85xx.h
@@ -44,14 +44,6 @@ #if defined(CONFIG_TQM8540) || defined(C
#include <platforms/85xx/tqm85xx.h>
#endif
-#define _IO_BASE isa_io_base
-#define _ISA_MEM_BASE isa_mem_base
-#ifdef CONFIG_PCI
-#define PCI_DRAM_OFFSET pci_dram_offset
-#else
-#define PCI_DRAM_OFFSET 0
-#endif
-
/*
* The "residual" board information structure the boot loader passes
* into the kernel.
--
1.4.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-11 9:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-11 9:53 [PATCH] ppc/powerpc: Fix io.h for config with CONFIG_PCI not set Sylvain Munaut
-- strict thread matches above, loose matches on Subject: below --
2006-11-05 0:17 Sylvain Munaut
2006-11-05 1:12 ` Benjamin Herrenschmidt
2006-11-05 1:45 ` Sylvain Munaut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).