[2/2] ARM: msm: Remove PLAT_PHYS_OFFSETS from MSM targets
diff mbox

Message ID 1311884291-5409-2-git-send-email-davidb@codeaurora.org
State New, archived
Headers show

Commit Message

David Brown July 28, 2011, 8:18 p.m. UTC
Now that MSM can boot with the phys offset patching, eliminate the
definitions of the phys offsets, and instead select
ARM_PATCH_PHYS_VIRT.

Signed-off-by: David Brown <davidb@codeaurora.org>

Comments

Nicolas Pitre July 28, 2011, 8:49 p.m. UTC | #1
On Thu, 28 Jul 2011, David Brown wrote:

> Now that MSM can boot with the phys offset patching, eliminate the
> definitions of the phys offsets, and instead select
> ARM_PATCH_PHYS_VIRT.
> 
> Signed-off-by: David Brown <davidb@codeaurora.org>
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index ced9371..3a4d87c 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -618,6 +618,7 @@ config ARCH_MSM
>  	select GENERIC_CLOCKEVENTS
>  	select ARCH_REQUIRE_GPIOLIB
>  	select CLKDEV_LOOKUP
> +	select ARM_PATCH_PHYS_VIRT
>  	help
>  	  Support for Qualcomm MSM/QSD based systems.  This runs on the
>  	  apps processor of the MSM/QSD and depends on a shared memory
> diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
> index 58d5e7e..deed41a 100644
> --- a/arch/arm/mach-msm/include/mach/memory.h
> +++ b/arch/arm/mach-msm/include/mach/memory.h
> @@ -17,19 +17,12 @@
>  #define __ASM_ARCH_MEMORY_H
>  
>  /* physical offset of RAM */
> -#if defined(CONFIG_ARCH_QSD8X50) && defined(CONFIG_MSM_SOC_REV_A)
> -#define PLAT_PHYS_OFFSET		UL(0x00000000)
> -#elif defined(CONFIG_ARCH_QSD8X50)
> -#define PLAT_PHYS_OFFSET		UL(0x20000000)
> -#elif defined(CONFIG_ARCH_MSM7X30)
> -#define PLAT_PHYS_OFFSET		UL(0x00000000)
> -#elif defined(CONFIG_ARCH_MSM8X60)
> -#define PLAT_PHYS_OFFSET		UL(0x40000000)
> -#elif defined(CONFIG_ARCH_MSM8960)
> -#define PLAT_PHYS_OFFSET		UL(0x40000000)
> -#else
> -#define PLAT_PHYS_OFFSET		UL(0x10000000)
> -#endif
> +#define QSD8X50A_PHYS_OFFSET		UL(0x00000000)
> +#define QSD8X50_PHYS_OFFSET		UL(0x20000000)
> +#define MSM7X30_PHYS_OFFSET		UL(0x00000000)
> +#define MSM8X60_PHYS_OFFSET		UL(0x10000000)
> +#define MSM8960_PHYS_OFFSET		UL(0x40000000)
> +#define MSM7X01_PHYS_OFFSET		UL(0x10000000)

Do you really need those defines?  If you do I'd suggest moving them 
elsewhere so your mach/memory.h can become empty.


Nicolas
David Brown July 28, 2011, 9 p.m. UTC | #2
On Thu, Jul 28, 2011 at 04:49:18PM -0400, Nicolas Pitre wrote:
> On Thu, 28 Jul 2011, David Brown wrote:
> 
> > Now that MSM can boot with the phys offset patching, eliminate the
> > definitions of the phys offsets, and instead select
> > ARM_PATCH_PHYS_VIRT.
> > 
> > Signed-off-by: David Brown <davidb@codeaurora.org>
> > 
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index ced9371..3a4d87c 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -618,6 +618,7 @@ config ARCH_MSM
> >  	select GENERIC_CLOCKEVENTS
> >  	select ARCH_REQUIRE_GPIOLIB
> >  	select CLKDEV_LOOKUP
> > +	select ARM_PATCH_PHYS_VIRT
> >  	help
> >  	  Support for Qualcomm MSM/QSD based systems.  This runs on the
> >  	  apps processor of the MSM/QSD and depends on a shared memory
> > diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
> > index 58d5e7e..deed41a 100644
> > --- a/arch/arm/mach-msm/include/mach/memory.h
> > +++ b/arch/arm/mach-msm/include/mach/memory.h
> > @@ -17,19 +17,12 @@
> >  #define __ASM_ARCH_MEMORY_H
> >  
> >  /* physical offset of RAM */
> > -#if defined(CONFIG_ARCH_QSD8X50) && defined(CONFIG_MSM_SOC_REV_A)
> > -#define PLAT_PHYS_OFFSET		UL(0x00000000)
> > -#elif defined(CONFIG_ARCH_QSD8X50)
> > -#define PLAT_PHYS_OFFSET		UL(0x20000000)
> > -#elif defined(CONFIG_ARCH_MSM7X30)
> > -#define PLAT_PHYS_OFFSET		UL(0x00000000)
> > -#elif defined(CONFIG_ARCH_MSM8X60)
> > -#define PLAT_PHYS_OFFSET		UL(0x40000000)
> > -#elif defined(CONFIG_ARCH_MSM8960)
> > -#define PLAT_PHYS_OFFSET		UL(0x40000000)
> > -#else
> > -#define PLAT_PHYS_OFFSET		UL(0x10000000)
> > -#endif
> > +#define QSD8X50A_PHYS_OFFSET		UL(0x00000000)
> > +#define QSD8X50_PHYS_OFFSET		UL(0x20000000)
> > +#define MSM7X30_PHYS_OFFSET		UL(0x00000000)
> > +#define MSM8X60_PHYS_OFFSET		UL(0x10000000)
> > +#define MSM8960_PHYS_OFFSET		UL(0x40000000)
> > +#define MSM7X01_PHYS_OFFSET		UL(0x10000000)
> 
> Do you really need those defines?  If you do I'd suggest moving them 
> elsewhere so your mach/memory.h can become empty.

Currently, they aren't needed at all.  I'll just remove them entirely
until something needs them.  The values will be in the history.

Thanks,
David
Russell King - ARM Linux July 29, 2011, 10:32 a.m. UTC | #3
On Thu, Jul 28, 2011 at 01:18:11PM -0700, David Brown wrote:
> Now that MSM can boot with the phys offset patching, eliminate the
> definitions of the phys offsets, and instead select
> ARM_PATCH_PHYS_VIRT.

I think it may be better to remove the EXPERIMENTAL status of
ARM_PATCH_PHYS_VIRT, and make the option default to 'y' now, so that
we start building all kernels with this enabled.  If people don't
want it (and know what they're doing) they can disable it manually
(maybe make the option only appear for EXPERT).

Lets see about that after this merge window is over.
Nicolas Pitre July 29, 2011, 12:42 p.m. UTC | #4
On Fri, 29 Jul 2011, Russell King - ARM Linux wrote:

> On Thu, Jul 28, 2011 at 01:18:11PM -0700, David Brown wrote:
> > Now that MSM can boot with the phys offset patching, eliminate the
> > definitions of the phys offsets, and instead select
> > ARM_PATCH_PHYS_VIRT.
> 
> I think it may be better to remove the EXPERIMENTAL status of
> ARM_PATCH_PHYS_VIRT, and make the option default to 'y' now, so that
> we start building all kernels with this enabled.  If people don't
> want it (and know what they're doing) they can disable it manually
> (maybe make the option only appear for EXPERT).

One of my jumbo patch series is doing that.

> Lets see about that after this merge window is over.

Right.


Nicolas
David Brown July 29, 2011, 2:01 p.m. UTC | #5
On Fri, Jul 29, 2011 at 08:42:15AM -0400, Nicolas Pitre wrote:
> On Fri, 29 Jul 2011, Russell King - ARM Linux wrote:
> 
> > On Thu, Jul 28, 2011 at 01:18:11PM -0700, David Brown wrote:
> > > Now that MSM can boot with the phys offset patching, eliminate the
> > > definitions of the phys offsets, and instead select
> > > ARM_PATCH_PHYS_VIRT.
> > 
> > I think it may be better to remove the EXPERIMENTAL status of
> > ARM_PATCH_PHYS_VIRT, and make the option default to 'y' now, so that
> > we start building all kernels with this enabled.  If people don't
> > want it (and know what they're doing) they can disable it manually
> > (maybe make the option only appear for EXPERT).
> 
> One of my jumbo patch series is doing that.
> 
> > Lets see about that after this merge window is over.

In that case, I'll resend just the second of my patches after this
series.

Thanks,
David

Patch
diff mbox

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ced9371..3a4d87c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -618,6 +618,7 @@  config ARCH_MSM
 	select GENERIC_CLOCKEVENTS
 	select ARCH_REQUIRE_GPIOLIB
 	select CLKDEV_LOOKUP
+	select ARM_PATCH_PHYS_VIRT
 	help
 	  Support for Qualcomm MSM/QSD based systems.  This runs on the
 	  apps processor of the MSM/QSD and depends on a shared memory
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
index 58d5e7e..deed41a 100644
--- a/arch/arm/mach-msm/include/mach/memory.h
+++ b/arch/arm/mach-msm/include/mach/memory.h
@@ -17,19 +17,12 @@ 
 #define __ASM_ARCH_MEMORY_H
 
 /* physical offset of RAM */
-#if defined(CONFIG_ARCH_QSD8X50) && defined(CONFIG_MSM_SOC_REV_A)
-#define PLAT_PHYS_OFFSET		UL(0x00000000)
-#elif defined(CONFIG_ARCH_QSD8X50)
-#define PLAT_PHYS_OFFSET		UL(0x20000000)
-#elif defined(CONFIG_ARCH_MSM7X30)
-#define PLAT_PHYS_OFFSET		UL(0x00000000)
-#elif defined(CONFIG_ARCH_MSM8X60)
-#define PLAT_PHYS_OFFSET		UL(0x40000000)
-#elif defined(CONFIG_ARCH_MSM8960)
-#define PLAT_PHYS_OFFSET		UL(0x40000000)
-#else
-#define PLAT_PHYS_OFFSET		UL(0x10000000)
-#endif
+#define QSD8X50A_PHYS_OFFSET		UL(0x00000000)
+#define QSD8X50_PHYS_OFFSET		UL(0x20000000)
+#define MSM7X30_PHYS_OFFSET		UL(0x00000000)
+#define MSM8X60_PHYS_OFFSET		UL(0x10000000)
+#define MSM8960_PHYS_OFFSET		UL(0x40000000)
+#define MSM7X01_PHYS_OFFSET		UL(0x10000000)
 
 #endif