diff mbox

[2/3] ARM: PRIMA2: make mach-prima2 common for all SiRF series SoC

Message ID 1345450787-17246-3-git-send-email-Barry.Song@csr.com (mailing list archive)
State New, archived
Headers show

Commit Message

Barry Song Aug. 20, 2012, 8:19 a.m. UTC
From: Barry Song <Baohua.Song@csr.com>

We will have SiRF Marco and Polo, so rename the dir to mach-sirf
and add Kconfig menu

Signed-off-by: Baohua Song <Baohua.Song@csr.com>
---
 arch/arm/Kconfig                                   |   10 +++++-----
 arch/arm/Makefile                                  |    2 +-
 arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
 arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
 arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
 .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
 arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
 .../include/mach/clkdev.h                          |    0
 .../include/mach/debug-macro.S                     |    0
 .../include/mach/entry-macro.S                     |    0
 .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
 .../include/mach/hardware.h                        |    0
 .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
 .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0
 .../include/mach/timex.h                           |    0
 .../{mach-prima2 => mach-sirf}/include/mach/uart.h |    0
 .../include/mach/uncompress.h                      |    0
 arch/arm/{mach-prima2 => mach-sirf}/irq.c          |    0
 arch/arm/{mach-prima2 => mach-sirf}/l2x0.c         |    0
 arch/arm/{mach-prima2 => mach-sirf}/lluart.c       |    0
 arch/arm/{mach-prima2 => mach-sirf}/pm.c           |    0
 arch/arm/{mach-prima2 => mach-sirf}/pm.h           |    0
 arch/arm/{mach-prima2 => mach-sirf}/rstc.c         |    0
 arch/arm/{mach-prima2 => mach-sirf}/rtciobrg.c     |    0
 arch/arm/{mach-prima2 => mach-sirf}/sleep.S        |    0
 arch/arm/{mach-prima2 => mach-sirf}/timer.c        |    0
 26 files changed, 22 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/mach-sirf/Kconfig
 rename arch/arm/{mach-prima2 => mach-sirf}/Makefile (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/board-generic.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/common.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/clkdev.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/debug-macro.S (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/entry-macro.S (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/gpio.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/hardware.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/irqs.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/map.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/timex.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/uart.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/include/mach/uncompress.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/irq.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/l2x0.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/lluart.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/pm.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/pm.h (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/rstc.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/rtciobrg.c (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/sleep.S (100%)
 rename arch/arm/{mach-prima2 => mach-sirf}/timer.c (100%)

diff --git a/arch/arm/mach-prima2/Makefile b/arch/arm/mach-sirf/Makefile
similarity index 100%
rename from arch/arm/mach-prima2/Makefile
rename to arch/arm/mach-sirf/Makefile
diff --git a/arch/arm/mach-prima2/Makefile.boot b/arch/arm/mach-sirf/Makefile.boot
similarity index 100%
rename from arch/arm/mach-prima2/Makefile.boot
rename to arch/arm/mach-sirf/Makefile.boot
diff --git a/arch/arm/mach-prima2/board-generic.c b/arch/arm/mach-sirf/board-generic.c
similarity index 100%
rename from arch/arm/mach-prima2/board-generic.c
rename to arch/arm/mach-sirf/board-generic.c
diff --git a/arch/arm/mach-prima2/common.h b/arch/arm/mach-sirf/common.h
similarity index 100%
rename from arch/arm/mach-prima2/common.h
rename to arch/arm/mach-sirf/common.h
diff --git a/arch/arm/mach-prima2/include/mach/clkdev.h b/arch/arm/mach-sirf/include/mach/clkdev.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/clkdev.h
rename to arch/arm/mach-sirf/include/mach/clkdev.h
diff --git a/arch/arm/mach-prima2/include/mach/debug-macro.S b/arch/arm/mach-sirf/include/mach/debug-macro.S
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/debug-macro.S
rename to arch/arm/mach-sirf/include/mach/debug-macro.S
diff --git a/arch/arm/mach-prima2/include/mach/entry-macro.S b/arch/arm/mach-sirf/include/mach/entry-macro.S
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/entry-macro.S
rename to arch/arm/mach-sirf/include/mach/entry-macro.S
diff --git a/arch/arm/mach-prima2/include/mach/gpio.h b/arch/arm/mach-sirf/include/mach/gpio.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/gpio.h
rename to arch/arm/mach-sirf/include/mach/gpio.h
diff --git a/arch/arm/mach-prima2/include/mach/hardware.h b/arch/arm/mach-sirf/include/mach/hardware.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/hardware.h
rename to arch/arm/mach-sirf/include/mach/hardware.h
diff --git a/arch/arm/mach-prima2/include/mach/irqs.h b/arch/arm/mach-sirf/include/mach/irqs.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/irqs.h
rename to arch/arm/mach-sirf/include/mach/irqs.h
diff --git a/arch/arm/mach-prima2/include/mach/map.h b/arch/arm/mach-sirf/include/mach/map.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/map.h
rename to arch/arm/mach-sirf/include/mach/map.h
diff --git a/arch/arm/mach-prima2/include/mach/timex.h b/arch/arm/mach-sirf/include/mach/timex.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/timex.h
rename to arch/arm/mach-sirf/include/mach/timex.h
diff --git a/arch/arm/mach-prima2/include/mach/uart.h b/arch/arm/mach-sirf/include/mach/uart.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/uart.h
rename to arch/arm/mach-sirf/include/mach/uart.h
diff --git a/arch/arm/mach-prima2/include/mach/uncompress.h b/arch/arm/mach-sirf/include/mach/uncompress.h
similarity index 100%
rename from arch/arm/mach-prima2/include/mach/uncompress.h
rename to arch/arm/mach-sirf/include/mach/uncompress.h
diff --git a/arch/arm/mach-prima2/irq.c b/arch/arm/mach-sirf/irq.c
similarity index 100%
rename from arch/arm/mach-prima2/irq.c
rename to arch/arm/mach-sirf/irq.c
diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-sirf/l2x0.c
similarity index 100%
rename from arch/arm/mach-prima2/l2x0.c
rename to arch/arm/mach-sirf/l2x0.c
diff --git a/arch/arm/mach-prima2/lluart.c b/arch/arm/mach-sirf/lluart.c
similarity index 100%
rename from arch/arm/mach-prima2/lluart.c
rename to arch/arm/mach-sirf/lluart.c
diff --git a/arch/arm/mach-prima2/pm.c b/arch/arm/mach-sirf/pm.c
similarity index 100%
rename from arch/arm/mach-prima2/pm.c
rename to arch/arm/mach-sirf/pm.c
diff --git a/arch/arm/mach-prima2/pm.h b/arch/arm/mach-sirf/pm.h
similarity index 100%
rename from arch/arm/mach-prima2/pm.h
rename to arch/arm/mach-sirf/pm.h
diff --git a/arch/arm/mach-prima2/rstc.c b/arch/arm/mach-sirf/rstc.c
similarity index 100%
rename from arch/arm/mach-prima2/rstc.c
rename to arch/arm/mach-sirf/rstc.c
diff --git a/arch/arm/mach-prima2/rtciobrg.c b/arch/arm/mach-sirf/rtciobrg.c
similarity index 100%
rename from arch/arm/mach-prima2/rtciobrg.c
rename to arch/arm/mach-sirf/rtciobrg.c
diff --git a/arch/arm/mach-prima2/sleep.S b/arch/arm/mach-sirf/sleep.S
similarity index 100%
rename from arch/arm/mach-prima2/sleep.S
rename to arch/arm/mach-sirf/sleep.S
diff --git a/arch/arm/mach-prima2/timer.c b/arch/arm/mach-sirf/timer.c
similarity index 100%
rename from arch/arm/mach-prima2/timer.c
rename to arch/arm/mach-sirf/timer.c

Comments

Arnd Bergmann Aug. 20, 2012, 9:06 p.m. UTC | #1
On Monday 20 August 2012, Barry Song wrote:
> From: Barry Song <Baohua.Song@csr.com>
> 
> We will have SiRF Marco and Polo, so rename the dir to mach-sirf
> and add Kconfig menu
> 
> Signed-off-by: Baohua Song <Baohua.Song@csr.com>
> ---
>  arch/arm/Kconfig                                   |   10 +++++-----
>  arch/arm/Makefile                                  |    2 +-
>  arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
>  arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
>  arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
>  .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
>  arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
>  .../include/mach/clkdev.h                          |    0
>  .../include/mach/debug-macro.S                     |    0
>  .../include/mach/entry-macro.S                     |    0
>  .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
>  .../include/mach/hardware.h                        |    0
>  .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
>  .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0

I'm not sure if we should rename all of these right now. I've been thinking
about moving all of recent and simple ARMv7 based platforms (socfpga, zynq,
prima2, ...) into a single directory, where they would basically end up
being one file per platform. We should discuss this at the ARM mini summit,
and I can let you know the outcome of it. I don't object on the rename in
principle, but it might end up causing extra churn.

> +if ARCH_SIRF
> +
> +choice
> +       prompt "Qualcomm SiRF SoC Type"
> +       default ARCH_PRIMA2

I'm curious about this: I did read that Samsung acquired CSR, and
you list the chips as Qualcomm. What's the story here?

> +config ARCH_PRIMA2
> +       bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
> +       select CPU_V7
> +       select ZONE_DMA
> +       help
> +          Support for CSR SiRFSoC ARM Cortex A9 Platform
> +
> +endchoice

Is this still needed? When you add other SoC type here, would you
build kernels that are for just one of them in practice?  If they
are completely generic anyway, you can skip the submenu.

	Arnd
Barry Song Aug. 21, 2012, 1:56 a.m. UTC | #2
2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Monday 20 August 2012, Barry Song wrote:
>> From: Barry Song <Baohua.Song@csr.com>
>>
>> We will have SiRF Marco and Polo, so rename the dir to mach-sirf
>> and add Kconfig menu
>>
>> Signed-off-by: Baohua Song <Baohua.Song@csr.com>
>> ---
>>  arch/arm/Kconfig                                   |   10 +++++-----
>>  arch/arm/Makefile                                  |    2 +-
>>  arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
>>  .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
>>  arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
>>  .../include/mach/clkdev.h                          |    0
>>  .../include/mach/debug-macro.S                     |    0
>>  .../include/mach/entry-macro.S                     |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
>>  .../include/mach/hardware.h                        |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0
>
> I'm not sure if we should rename all of these right now. I've been thinking
> about moving all of recent and simple ARMv7 based platforms (socfpga, zynq,
> prima2, ...) into a single directory, where they would basically end up
> being one file per platform. We should discuss this at the ARM mini summit,
> and I can let you know the outcome of it. I don't object on the rename in
> principle, but it might end up causing extra churn.

ok. i will follow the output of  ARM mini summit.

>
>> +if ARCH_SIRF
>> +
>> +choice
>> +       prompt "Qualcomm SiRF SoC Type"
>> +       default ARCH_PRIMA2
>
> I'm curious about this: I did read that Samsung acquired CSR, and
> you list the chips as Qualcomm. What's the story here?

sorry. this is typo.
prompt "Qualcomm SiRF SoC Type"
->
prompt "CSR SiRF SoC Type"

>
>> +config ARCH_PRIMA2
>> +       bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
>> +       select CPU_V7
>> +       select ZONE_DMA
>> +       help
>> +          Support for CSR SiRFSoC ARM Cortex A9 Platform
>> +
>> +endchoice
>
> Is this still needed? When you add other SoC type here, would you
> build kernels that are for just one of them in practice?  If they
> are completely generic anyway, you can skip the submenu.
>

for the moment, that is needed just because the DEBUG UART base
address is difficult for different SoC. debug-macro.S is very early,
it depends on the SIRFSOC_UART1_PA_BASE.

 /* UART-1: used as serial debug port */
 #ifdef CONFIG_ARCH_PRIMA2
#define SIRFSOC_UART1_PA_BASE          0xb0060000
 #elif defined(CONFIG_ARCH_MARCO)
#define SIRFSOC_UART1_PA_BASE          0xcc060000
#endif
otherwise, PRIMA2 and MARCO can co-exist.

i think i can find some ways to set the rp dynamically according to chip type.
         .macro  addruart, rp, rv, tmp
         ldr     \rp, =SIRFSOC_UART1_PA_BASE             @ physical
         ldr     \rv, =SIRFSOC_UART1_VA_BASE             @ virtual
         .endm


>         Arnd
>

-barry
Barry Song Aug. 21, 2012, 2:06 a.m. UTC | #3
Hi Arnd,

more comments.

2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Monday 20 August 2012, Barry Song wrote:
>> From: Barry Song <Baohua.Song@csr.com>
>>
>> We will have SiRF Marco and Polo, so rename the dir to mach-sirf
>> and add Kconfig menu
>>
>> Signed-off-by: Baohua Song <Baohua.Song@csr.com>
>> ---
>>  arch/arm/Kconfig                                   |   10 +++++-----
>>  arch/arm/Makefile                                  |    2 +-
>>  arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
>>  .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
>>  arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
>>  .../include/mach/clkdev.h                          |    0
>>  .../include/mach/debug-macro.S                     |    0
>>  .../include/mach/entry-macro.S                     |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
>>  .../include/mach/hardware.h                        |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
>>  .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0
>
> I'm not sure if we should rename all of these right now. I've been thinking
> about moving all of recent and simple ARMv7 based platforms (socfpga, zynq,
> prima2, ...) into a single directory, where they would basically end up
> being one file per platform. We should discuss this at the ARM mini summit,
> and I can let you know the outcome of it. I don't object on the rename in
> principle, but it might end up causing extra churn.

we will have other SoCs which are more complex than primaII. i am not
sure whether you can merge all of them into a single dir together with
zynq or other platforms.
i am debugging the patches of MARCO and will send them soon. this
series is just preparing for delivering MARCO patches.

>
>> +if ARCH_SIRF
>> +
>> +choice
>> +       prompt "Qualcomm SiRF SoC Type"
>> +       default ARCH_PRIMA2
>
> I'm curious about this: I did read that Samsung acquired CSR, and
> you list the chips as Qualcomm. What's the story here?

BTW, i just want to clarify Samsung  acquired the mobile business of
CSR, not including our primaII or other SoCs.

>
>> +config ARCH_PRIMA2
>> +       bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
>> +       select CPU_V7
>> +       select ZONE_DMA
>> +       help
>> +          Support for CSR SiRFSoC ARM Cortex A9 Platform
>> +
>> +endchoice
>
> Is this still needed? When you add other SoC type here, would you
> build kernels that are for just one of them in practice?  If they
> are completely generic anyway, you can skip the submenu.
>
>         Arnd
>

-barry
Arnd Bergmann Aug. 21, 2012, 7:55 a.m. UTC | #4
On Tuesday 21 August 2012, Barry Song wrote:
> >
> >> +if ARCH_SIRF
> >> +
> >> +choice
> >> +       prompt "Qualcomm SiRF SoC Type"
> >> +       default ARCH_PRIMA2
> >
> > I'm curious about this: I did read that Samsung acquired CSR, and
> > you list the chips as Qualcomm. What's the story here?
> 
> BTW, i just want to clarify Samsung  acquired the mobile business of
> CSR, not including our primaII or other SoCs.

Ah, I had not realized that. Thanks for the clarification.

	Arnd
Arnd Bergmann Aug. 21, 2012, 7:57 a.m. UTC | #5
On Tuesday 21 August 2012, Barry Song wrote:
> for the moment, that is needed just because the DEBUG UART base
> address is difficult for different SoC. debug-macro.S is very early,
> it depends on the SIRFSOC_UART1_PA_BASE.
> 
>  /* UART-1: used as serial debug port */
>  #ifdef CONFIG_ARCH_PRIMA2
> #define SIRFSOC_UART1_PA_BASE          0xb0060000
>  #elif defined(CONFIG_ARCH_MARCO)
> #define SIRFSOC_UART1_PA_BASE          0xcc060000
> #endif
> otherwise, PRIMA2 and MARCO can co-exist.

Ok, I see.

> i think i can find some ways to set the rp dynamically according to chip type.
>          .macro  addruart, rp, rv, tmp
>          ldr     \rp, =SIRFSOC_UART1_PA_BASE             @ physical
>          ldr     \rv, =SIRFSOC_UART1_VA_BASE             @ virtual
>          .endm

The most common way to do this is to have multiple entries in
arch/arm/Kconfig.debug in the "Kernel low-level debugging port"
menu. For production kernels, you would just leave out DEBUG_LL
while for debugging you have to pick one UART.

	Arnd
Barry Song Aug. 21, 2012, 9:16 a.m. UTC | #6
Hi Arnd,

2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Tuesday 21 August 2012, Barry Song wrote:
>> for the moment, that is needed just because the DEBUG UART base
>> address is difficult for different SoC. debug-macro.S is very early,
>> it depends on the SIRFSOC_UART1_PA_BASE.
>>
>>  /* UART-1: used as serial debug port */
>>  #ifdef CONFIG_ARCH_PRIMA2
>> #define SIRFSOC_UART1_PA_BASE          0xb0060000
>>  #elif defined(CONFIG_ARCH_MARCO)
>> #define SIRFSOC_UART1_PA_BASE          0xcc060000
>> #endif
>> otherwise, PRIMA2 and MARCO can co-exist.
>
> Ok, I see.
>
>> i think i can find some ways to set the rp dynamically according to chip type.
>>          .macro  addruart, rp, rv, tmp
>>          ldr     \rp, =SIRFSOC_UART1_PA_BASE             @ physical
>>          ldr     \rv, =SIRFSOC_UART1_VA_BASE             @ virtual
>>          .endm
>
> The most common way to do this is to have multiple entries in
> arch/arm/Kconfig.debug in the "Kernel low-level debugging port"
> menu. For production kernels, you would just leave out DEBUG_LL
> while for debugging you have to pick one UART.

then i add these to Kconfig.debug as it is a common way

        config DEBUG_PRIMA2_UART1
                bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
                depends on ARCH_PRIMA2
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART1 serial port on SiRFprimaII devices.

        config DEBUG_MARCO_UART1
                bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
                depends on ARCH_MARCO
                help
                  Say Y here if you want the debug print routines to direct
                  their output to UART1 serial port on SiRFmarco devices.

and these in mach-prima2/include/mach/uart.h

  #ifdef CONFIG_DEBUG_PRIMA2_UART1
  #define SIRFSOC_UART1_PA_BASE          0xb0060000
  #elif defined(CONFIG_DEBUG_MARCO_UART1)
  #define SIRFSOC_UART1_PA_BASE          0xcc060000
  #endif

the above codes seem still ugly ?

>
>         Arnd

-barry
Arnd Bergmann Aug. 21, 2012, 9:20 a.m. UTC | #7
On Tuesday 21 August 2012, Barry Song wrote:
> then i add these to Kconfig.debug as it is a common way
> 
>         config DEBUG_PRIMA2_UART1
>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
>                 depends on ARCH_PRIMA2
>                 help
>                   Say Y here if you want the debug print routines to direct
>                   their output to UART1 serial port on SiRFprimaII devices.
> 
>         config DEBUG_MARCO_UART1
>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
>                 depends on ARCH_MARCO
>                 help
>                   Say Y here if you want the debug print routines to direct
>                   their output to UART1 serial port on SiRFmarco devices.
> 
> and these in mach-prima2/include/mach/uart.h
> 
>   #ifdef CONFIG_DEBUG_PRIMA2_UART1
>   #define SIRFSOC_UART1_PA_BASE          0xb0060000
>   #elif defined(CONFIG_DEBUG_MARCO_UART1)
>   #define SIRFSOC_UART1_PA_BASE          0xcc060000
>   #endif
> 
> the above codes seem still ugly ?
> 

No, that's fine, about as a good as it gets with today's kernel
capabilities. Just fix the description to have the correct
SoC name instead of "DaVinci DA8XX" ;-)

	Arnd
Barry Song Aug. 21, 2012, 9:29 a.m. UTC | #8
2012/8/21 Barry Song <21cnbao@gmail.com>:
> 2012/8/21 Arnd Bergmann <arnd@arndb.de>:
>> On Monday 20 August 2012, Barry Song wrote:
>>> From: Barry Song <Baohua.Song@csr.com>
>>>
>>> We will have SiRF Marco and Polo, so rename the dir to mach-sirf
>>> and add Kconfig menu
>>>
>>> Signed-off-by: Baohua Song <Baohua.Song@csr.com>
>>> ---
>>>  arch/arm/Kconfig                                   |   10 +++++-----
>>>  arch/arm/Makefile                                  |    2 +-
>>>  arch/arm/mach-sirf/Kconfig                         |   16 ++++++++++++++++
>>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile       |    0
>>>  arch/arm/{mach-prima2 => mach-sirf}/Makefile.boot  |    0
>>>  .../arm/{mach-prima2 => mach-sirf}/board-generic.c |    0
>>>  arch/arm/{mach-prima2 => mach-sirf}/common.h       |    0
>>>  .../include/mach/clkdev.h                          |    0
>>>  .../include/mach/debug-macro.S                     |    0
>>>  .../include/mach/entry-macro.S                     |    0
>>>  .../{mach-prima2 => mach-sirf}/include/mach/gpio.h |    0
>>>  .../include/mach/hardware.h                        |    0
>>>  .../{mach-prima2 => mach-sirf}/include/mach/irqs.h |    0
>>>  .../{mach-prima2 => mach-sirf}/include/mach/map.h  |    0
>>
>> I'm not sure if we should rename all of these right now. I've been thinking
>> about moving all of recent and simple ARMv7 based platforms (socfpga, zynq,
>> prima2, ...) into a single directory, where they would basically end up
>> being one file per platform. We should discuss this at the ARM mini summit,
>> and I can let you know the outcome of it. I don't object on the rename in
>> principle, but it might end up causing extra churn.
>
> ok. i will follow the output of  ARM mini summit.

i would think merging several SoCs into a dir still needs much time.
if the whole rename is too aggresive for the moment, how about keeping
the mach-prima2 temporarily, but this prima2 dir will also include the
coming Marco stuff?

-barry
Arnd Bergmann Aug. 21, 2012, 10:16 a.m. UTC | #9
On Tuesday 21 August 2012, Barry Song wrote:
> i would think merging several SoCs into a dir still needs much time.
> if the whole rename is too aggresive for the moment, how about keeping
> the mach-prima2 temporarily, but this prima2 dir will also include the
> coming Marco stuff?
> 

Yes, that is what I meant. Sorry if I wasn't clear on that. Please send
the marco patches adding the code in the mach-prima2 directory.


	Arnd
Barry Song Aug. 28, 2012, 6:15 a.m. UTC | #10
2012/8/21 Arnd Bergmann <arnd@arndb.de>:
> On Tuesday 21 August 2012, Barry Song wrote:
>> then i add these to Kconfig.debug as it is a common way
>>
>>         config DEBUG_PRIMA2_UART1
>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART1"
>>                 depends on ARCH_PRIMA2
>>                 help
>>                   Say Y here if you want the debug print routines to direct
>>                   their output to UART1 serial port on SiRFprimaII devices.
>>
>>         config DEBUG_MARCO_UART1
>>                 bool "Kernel low-level debugging on DaVinci DA8XX using UART2"
>>                 depends on ARCH_MARCO
>>                 help
>>                   Say Y here if you want the debug print routines to direct
>>                   their output to UART1 serial port on SiRFmarco devices.
>>
>> and these in mach-prima2/include/mach/uart.h
>>
>>   #ifdef CONFIG_DEBUG_PRIMA2_UART1
>>   #define SIRFSOC_UART1_PA_BASE          0xb0060000
>>   #elif defined(CONFIG_DEBUG_MARCO_UART1)
>>   #define SIRFSOC_UART1_PA_BASE          0xcc060000
>>   #endif
>>
>> the above codes seem still ugly ?
>>
>
> No, that's fine, about as a good as it gets with today's kernel
> capabilities. Just fix the description to have the correct
> SoC name instead of "DaVinci DA8XX" ;-)

except the DEBUG_LL uart base address, i missed the zreladdr-y. for
primaii, it is 0x00008000, for marco, it is 0x40008000 as marco's
memory space begins from 0x4000000.
i would to have AUTO_ZRELADDR for the whole SiRF series.
but for uImage load address difference in uImage header, which blocks
multiple SoCs from using same uImage, is "KERNEL_NOLOAD" uImage type
the current generic solution?

>
>         Arnd

-barry
diff mbox

Patch

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index fb60148..21cc08a 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -407,9 +407,8 @@  config ARCH_GEMINI
 	help
 	  Support for the Cortina Systems Gemini family SoCs
 
-config ARCH_PRIMA2
-	bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
-	select CPU_V7
+config ARCH_SIRF
+	bool "CSR SiRF"
 	select NO_IOPORT
 	select ARCH_REQUIRE_GPIOLIB
 	select GENERIC_CLOCKEVENTS
@@ -419,9 +418,8 @@  config ARCH_PRIMA2
 	select PINCTRL
 	select PINCTRL_SIRF
 	select USE_OF
-	select ZONE_DMA
 	help
-          Support for CSR SiRFSoC ARM Cortex A9 Platform
+	  Support for CSR SiRFprimaII/Marco/Polo platforms
 
 config ARCH_EBSA110
 	bool "EBSA-110"
@@ -1118,6 +1116,8 @@  source "arch/arm/mach-exynos/Kconfig"
 
 source "arch/arm/mach-shmobile/Kconfig"
 
+source "arch/arm/mach-sirf/Kconfig"
+
 source "arch/arm/mach-tegra/Kconfig"
 
 source "arch/arm/mach-u300/Kconfig"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 30eae87..cc8da8e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -168,7 +168,7 @@  machine-$(CONFIG_ARCH_OMAP2PLUS)	:= omap2
 machine-$(CONFIG_ARCH_ORION5X)		:= orion5x
 machine-$(CONFIG_ARCH_PICOXCELL)	:= picoxcell
 machine-$(CONFIG_ARCH_PNX4008)		:= pnx4008
-machine-$(CONFIG_ARCH_PRIMA2)		:= prima2
+machine-$(CONFIG_ARCH_SIRF)		:= sirf
 machine-$(CONFIG_ARCH_PXA)		:= pxa
 machine-$(CONFIG_ARCH_REALVIEW)		:= realview
 machine-$(CONFIG_ARCH_RPC)		:= rpc
diff --git a/arch/arm/mach-sirf/Kconfig b/arch/arm/mach-sirf/Kconfig
new file mode 100644
index 0000000..811e782
--- /dev/null
+++ b/arch/arm/mach-sirf/Kconfig
@@ -0,0 +1,16 @@ 
+if ARCH_SIRF
+
+choice
+	prompt "Qualcomm SiRF SoC Type"
+	default ARCH_PRIMA2
+
+config ARCH_PRIMA2
+	bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
+	select CPU_V7
+	select ZONE_DMA
+	help
+          Support for CSR SiRFSoC ARM Cortex A9 Platform
+
+endchoice
+
+endif