* [PATCH 6 / 12] Mach omap2 updation for 3430
@ 2007-06-14 5:01 Syed Mohammed, Khasim
2007-06-14 11:46 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Syed Mohammed, Khasim @ 2007-06-14 5:01 UTC (permalink / raw)
To: Linux OMAP
Mach omap2 file updates for 3430
Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
Files:
clock.h
gpmc.c
id.c
io.c
irq.c
=======================================================================
diff -purN linux-omap/arch/arm/mach-omap2/clock.h val_3430_GIT/arch/arm/mach-omap2/clock.h
--- linux-omap/arch/arm/mach-omap2/clock.h 2007-05-25 15:52:23.000000000 -0500
+++ val_3430_GIT/arch/arm/mach-omap2/clock.h 2007-06-12 15:12:08.000000000 -0500
@@ -39,6 +39,7 @@ static u32 omap2_clksel_get_divisor(stru
#define RATE_IN_242X (1 << 0)
#define RATE_IN_243X (1 << 1)
+#define RATE_IN_343X (1 << 2)
/* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated.
* xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,CM_CLKSEL_DSP
diff -purN linux-omap/arch/arm/mach-omap2/gpmc.c val_3430_GIT/arch/arm/mach-omap2/gpmc.c
--- linux-omap/arch/arm/mach-omap2/gpmc.c 2007-05-16 14:32:40.000000000 -0500
+++ val_3430_GIT/arch/arm/mach-omap2/gpmc.c 2007-06-12 15:12:08.000000000 -0500
@@ -22,12 +22,10 @@
#undef DEBUG
-#ifdef CONFIG_ARCH_OMAP2420
+#if defined(CONFIG_ARCH_OMAP2420)
#define GPMC_BASE 0x6800a000
-#endif
-
-#ifdef CONFIG_ARCH_OMAP2430
-#define GPMC_BASE 0x6E000000
+#elif defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430)
+#define GPMC_BASE 0x6e000000
#endif
#define GPMC_REVISION 0x00
diff -purN linux-omap/arch/arm/mach-omap2/id.c val_3430_GIT/arch/arm/mach-omap2/id.c
--- linux-omap/arch/arm/mach-omap2/id.c 2006-11-20 21:54:01.000000000 -0600
+++ val_3430_GIT/arch/arm/mach-omap2/id.c 2007-06-12 15:12:08.000000000 -0500
@@ -18,11 +18,11 @@
#include <asm/io.h>
#if defined(CONFIG_ARCH_OMAP2420)
-#define OMAP24XX_TAP_BASE io_p2v(0x48014000)
-#endif
-
-#if defined(CONFIG_ARCH_OMAP2430)
-#define OMAP24XX_TAP_BASE io_p2v(0x4900A000)
+#define TAP_BASE io_p2v(0x48014000)
+#elif defined(CONFIG_ARCH_OMAP2430)
+#define TAP_BASE io_p2v(0x4900A000)
+#elif defined(CONFIG_ARCH_OMAP34XX)
+#define TAP_BASE io_p2v(0x54004000)
#endif
#define OMAP_TAP_IDCODE 0x0204
@@ -58,7 +58,7 @@ static struct omap_id omap_ids[] __initd
static u32 __init read_tap_reg(int reg)
{
- return __raw_readl(OMAP24XX_TAP_BASE + reg);
+ return __raw_readl(TAP_BASE + reg);
}
void __init omap2_check_revision(void)
@@ -118,9 +118,16 @@ void __init omap2_check_revision(void)
system_rev |= rev << 8;
- /* Add the cpu class info (24xx) */
- system_rev |= 0x24;
+ /* REVISIT:
+ * OMAP 3430 ES 1.0 does't populate IDCODE registers
+ * Following lines have to be revisited for next version
+ */
+#ifndef CONFIG_ARCH_OMAP3
+ system_rev |= 0x24;
+#else
+ system_rev |= 0x34;
+#endif
pr_info("OMAP%04x", system_rev >> 16);
if ((system_rev >> 8) & 0x0f)
printk("%x", (system_rev >> 8) & 0x0f);
diff -purN linux-omap/arch/arm/mach-omap2/io.c val_3430_GIT/arch/arm/mach-omap2/io.c
--- linux-omap/arch/arm/mach-omap2/io.c 2007-05-30 14:02:43.000000000 -0500
+++ val_3430_GIT/arch/arm/mach-omap2/io.c 2007-06-12 15:12:08.000000000 -0500
@@ -4,8 +4,11 @@
* OMAP2 I/O mapping code
*
* Copyright (C) 2005 Nokia Corporation
- * Author: Juha Yrjola<juha.yrjola@nokia.com>
- * Updated map desc to add 2430 support : <x0khasim@ti.com>
+ * Copyright (C) 2007 Texas Instruments
+ *
+ * Author:
+ * Juha Yrjola <juha.yrjola@nokia.com>
+ * Syed Khasim <x0khasim@ti.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -35,7 +38,9 @@ extern void omapfb_reserve_sdram(void);
* The machine specific code may provide the extra mapping besides the
* default mapping provided here.
*/
-static struct map_desc omap2_io_desc[] __initdata = {
+
+#ifdef CONFIG_ARCH_OMAP24XX
+static struct map_desc omap24xx_io_desc[] __initdata = {
{
.virtual = L3_24XX_VIRT,
.pfn = __phys_to_pfn(L3_24XX_PHYS),
@@ -48,7 +53,34 @@ static struct map_desc omap2_io_desc[] _
.length = L4_24XX_SIZE,
.type = MT_DEVICE
},
+};
+
+#ifdef CONFIG_ARCH_OMAP2420
+static struct map_desc omap242x_io_desc[] __initdata = {
+ {
+ .virtual = DSP_MEM_24XX_VIRT,
+ .pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS),
+ .length = DSP_MEM_24XX_SIZE,
+ .type = MT_DEVICE
+ },
+ {
+ .virtual = DSP_IPI_24XX_VIRT,
+ .pfn = __phys_to_pfn(DSP_IPI_24XX_PHYS),
+ .length = DSP_IPI_24XX_SIZE,
+ .type = MT_DEVICE
+ },
+ {
+ .virtual = DSP_MMU_24XX_VIRT,
+ .pfn = __phys_to_pfn(DSP_MMU_24XX_PHYS),
+ .length = DSP_MMU_24XX_SIZE,
+ .type = MT_DEVICE
+ },
+};
+
+#endif
+
#ifdef CONFIG_ARCH_OMAP2430
+static struct map_desc omap243x_io_desc[] __initdata = {
{
.virtual = L4_WK_243X_VIRT,
.pfn = __phys_to_pfn(L4_WK_243X_PHYS),
@@ -73,33 +105,74 @@ static struct map_desc omap2_io_desc[] _
.length = OMAP243X_SMS_SIZE,
.type = MT_DEVICE
},
+};
+#endif
#endif
+
+#ifdef CONFIG_ARCH_OMAP34XX
+static struct map_desc omap34xx_io_desc[] __initdata = {
{
- .virtual = DSP_MEM_24XX_VIRT,
- .pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS),
- .length = DSP_MEM_24XX_SIZE,
+ .virtual = L3_34XX_VIRT,
+ .pfn = __phys_to_pfn(L3_34XX_PHYS),
+ .length = L3_34XX_SIZE,
.type = MT_DEVICE
},
-#ifdef CONFIG_ARCH_OMAP2420
{
- .virtual = DSP_IPI_24XX_VIRT,
- .pfn = __phys_to_pfn(DSP_IPI_24XX_PHYS),
- .length = DSP_IPI_24XX_SIZE,
+ .virtual = L4_34XX_VIRT,
+ .pfn = __phys_to_pfn(L4_34XX_PHYS),
+ .length = L4_34XX_SIZE,
.type = MT_DEVICE
},
-#endif
{
- .virtual = DSP_MMU_24XX_VIRT,
- .pfn = __phys_to_pfn(DSP_MMU_24XX_PHYS),
- .length = DSP_MMU_24XX_SIZE,
+ .virtual = L4_WK_34XX_VIRT,
+ .pfn = __phys_to_pfn(L4_WK_34XX_PHYS),
+ .length = L4_WK_34XX_SIZE,
+ .type = MT_DEVICE
+ },
+ {
+ .virtual = OMAP34XX_GPMC_VIRT,
+ .pfn = __phys_to_pfn(OMAP34XX_GPMC_PHYS),
+ .length = OMAP34XX_GPMC_SIZE,
+ .type = MT_DEVICE
+ },
+ {
+ .virtual = OMAP343X_SMS_VIRT,
+ .pfn = __phys_to_pfn(OMAP343X_SMS_PHYS),
+ .length = OMAP343X_SMS_SIZE,
+ .type = MT_DEVICE
+ },
+ {
+ .virtual = OMAP343X_SDRC_VIRT,
+ .pfn = __phys_to_pfn(OMAP343X_SDRC_PHYS),
+ .length = OMAP343X_SDRC_SIZE,
+ .type = MT_DEVICE
+ },
+ {
+ .virtual = L4_PER_34XX_VIRT,
+ .pfn = __phys_to_pfn(L4_PER_34XX_PHYS),
+ .length = L4_PER_34XX_SIZE,
+ .type = MT_DEVICE
+ },
+ {
+ .virtual = L4_EMU_34XX_VIRT,
+ .pfn = __phys_to_pfn(L4_EMU_34XX_PHYS),
+ .length = L4_EMU_34XX_SIZE,
.type = MT_DEVICE
},
};
+#endif
void __init omap2_map_common_io(void)
{
- iotable_init(omap2_io_desc, ARRAY_SIZE(omap2_io_desc));
-
+#if defined(CONFIG_ARCH_OMAP2420)
+ iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
+ iotable_init(omap242x_io_desc, ARRAY_SIZE(omap242x_io_desc));
+#elif defined(CONFIG_ARCH_OMAP2430)
+ iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc));
+ iotable_init(omap243x_io_desc, ARRAY_SIZE(omap243x_io_desc));
+#elif defined(CONFIG_ARCH_OMAP34XX)
+ iotable_init(omap34xx_io_desc, ARRAY_SIZE(omap34xx_io_desc));
+#endif
/* Normally devicemaps_init() would flush caches and tlb after
* mdesc->map_io(), but we must also do it here because of the CPU
* revision check below.
diff -purN linux-omap/arch/arm/mach-omap2/irq.c val_3430_GIT/arch/arm/mach-omap2/irq.c
--- linux-omap/arch/arm/mach-omap2/irq.c 2007-01-08 18:55:58.000000000 -0600
+++ val_3430_GIT/arch/arm/mach-omap2/irq.c 2007-06-12 15:12:08.000000000 -0500
@@ -37,11 +37,9 @@ static struct omap_irq_bank {
} __attribute__ ((aligned(4))) irq_banks[] = {
{
/* MPU INTC */
- .base_reg = IO_ADDRESS(OMAP24XX_IC_BASE),
+ .base_reg = 0,
.nr_irqs = 96,
- }, {
- /* XXX: DSP INTC */
- }
+ },
};
/* XXX: FIQ and additional INTC support (only MPU at the moment) */
@@ -118,10 +116,16 @@ void __init omap_init_irq(void)
for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
struct omap_irq_bank *bank = irq_banks + i;
- /* XXX */
- if (!bank->base_reg)
- continue;
-
+#ifdef CONFIG_ARCH_OMAP24XX
+ if (cpu_is_omap24xx()) {
+ bank->base_reg = IO_ADDRESS(OMAP24XX_IC_BASE);
+ }
+#endif
+#ifdef CONFIG_ARCH_OMAP34XX
+ if (cpu_is_omap34xx()) {
+ bank->base_reg = IO_ADDRESS(OMAP34XX_IC_BASE);
+ }
+#endif
omap_irq_bank_init_one(bank);
nr_irqs += bank->nr_irqs;
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 6 / 12] Mach omap2 updation for 3430
2007-06-14 5:01 [PATCH 6 / 12] Mach omap2 updation for 3430 Syed Mohammed, Khasim
@ 2007-06-14 11:46 ` Tony Lindgren
2007-06-14 21:03 ` Syed Mohammed, Khasim
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2007-06-14 11:46 UTC (permalink / raw)
To: Syed Mohammed, Khasim; +Cc: Linux OMAP
* Syed Mohammed, Khasim <x0khasim@ti.com> [070613 22:10]:
>
> Mach omap2 file updates for 3430
>
<snip>
> diff -purN linux-omap/arch/arm/mach-omap2/io.c val_3430_GIT/arch/arm/mach-omap2/io.c
> --- linux-omap/arch/arm/mach-omap2/io.c 2007-05-30 14:02:43.000000000 -0500
> +++ val_3430_GIT/arch/arm/mach-omap2/io.c 2007-06-12 15:12:08.000000000 -0500
> @@ -4,8 +4,11 @@
> * OMAP2 I/O mapping code
> *
> * Copyright (C) 2005 Nokia Corporation
> - * Author: Juha Yrjola<juha.yrjola@nokia.com>
> - * Updated map desc to add 2430 support : <x0khasim@ti.com>
> + * Copyright (C) 2007 Texas Instruments
> + *
> + * Author:
> + * Juha Yrjola <juha.yrjola@nokia.com>
> + * Syed Khasim <x0khasim@ti.com>
> *
> * This program is free software; you can redistribute it and/or modify
> * it under the terms of the GNU General Public License version 2 as
> @@ -35,7 +38,9 @@ extern void omapfb_reserve_sdram(void);
> * The machine specific code may provide the extra mapping besides the
> * default mapping provided here.
> */
> -static struct map_desc omap2_io_desc[] __initdata = {
> +
> +#ifdef CONFIG_ARCH_OMAP24XX
> +static struct map_desc omap24xx_io_desc[] __initdata = {
> {
> .virtual = L3_24XX_VIRT,
> .pfn = __phys_to_pfn(L3_24XX_PHYS),
> @@ -48,7 +53,34 @@ static struct map_desc omap2_io_desc[] _
> .length = L4_24XX_SIZE,
> .type = MT_DEVICE
> },
> +};
> +
> +#ifdef CONFIG_ARCH_OMAP2420
> +static struct map_desc omap242x_io_desc[] __initdata = {
> + {
> + .virtual = DSP_MEM_24XX_VIRT,
> + .pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS),
> + .length = DSP_MEM_24XX_SIZE,
> + .type = MT_DEVICE
> + },
> + {
> + .virtual = DSP_IPI_24XX_VIRT,
> + .pfn = __phys_to_pfn(DSP_IPI_24XX_PHYS),
> + .length = DSP_IPI_24XX_SIZE,
> + .type = MT_DEVICE
> + },
> + {
> + .virtual = DSP_MMU_24XX_VIRT,
> + .pfn = __phys_to_pfn(DSP_MMU_24XX_PHYS),
> + .length = DSP_MMU_24XX_SIZE,
> + .type = MT_DEVICE
> + },
> +};
> +
> +#endif
> +
> #ifdef CONFIG_ARCH_OMAP2430
> +static struct map_desc omap243x_io_desc[] __initdata = {
> {
> .virtual = L4_WK_243X_VIRT,
> .pfn = __phys_to_pfn(L4_WK_243X_PHYS),
> @@ -73,33 +105,74 @@ static struct map_desc omap2_io_desc[] _
> .length = OMAP243X_SMS_SIZE,
> .type = MT_DEVICE
> },
> +};
> +#endif
Can you please split this patch so we can apply the changes for 2420
and 2430 first as a pre-3430 patch? And then a separate patch that
adds the 3430 io.c changes. This way we can send io.c changes upstream
before we send 3430 changes.
> --- linux-omap/arch/arm/mach-omap2/irq.c 2007-01-08 18:55:58.000000000 -0600
> +++ val_3430_GIT/arch/arm/mach-omap2/irq.c 2007-06-12 15:12:08.000000000 -0500
> @@ -37,11 +37,9 @@ static struct omap_irq_bank {
> } __attribute__ ((aligned(4))) irq_banks[] = {
> {
> /* MPU INTC */
> - .base_reg = IO_ADDRESS(OMAP24XX_IC_BASE),
> + .base_reg = 0,
> .nr_irqs = 96,
> - }, {
> - /* XXX: DSP INTC */
> - }
> + },
> };
>
> /* XXX: FIQ and additional INTC support (only MPU at the moment) */
> @@ -118,10 +116,16 @@ void __init omap_init_irq(void)
> for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
> struct omap_irq_bank *bank = irq_banks + i;
>
> - /* XXX */
> - if (!bank->base_reg)
> - continue;
> -
> +#ifdef CONFIG_ARCH_OMAP24XX
> + if (cpu_is_omap24xx()) {
> + bank->base_reg = IO_ADDRESS(OMAP24XX_IC_BASE);
> + }
> +#endif
> +#ifdef CONFIG_ARCH_OMAP34XX
> + if (cpu_is_omap34xx()) {
> + bank->base_reg = IO_ADDRESS(OMAP34XX_IC_BASE);
> + }
> +#endif
> omap_irq_bank_init_one(bank);
>
> nr_irqs += bank->nr_irqs;
>
You should be able to leave out the ifdefs above, if one of the omaps
is disabled, then it will get optimized out as it will be if (0) {}.
This is assuming the _IC_BASE defines are visible to both, of course.
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: [PATCH 6 / 12] Mach omap2 updation for 3430
2007-06-14 11:46 ` Tony Lindgren
@ 2007-06-14 21:03 ` Syed Mohammed, Khasim
2007-06-15 8:13 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Syed Mohammed, Khasim @ 2007-06-14 21:03 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Linux OMAP
Hi Tony,
>> +#ifdef CONFIG_ARCH_OMAP24XX
>> + if (cpu_is_omap24xx()) {
>> + bank->base_reg = IO_ADDRESS(OMAP24XX_IC_BASE);
>> + }
>> +#endif
>> +#ifdef CONFIG_ARCH_OMAP34XX
>> + if (cpu_is_omap34xx()) {
>> + bank->base_reg = IO_ADDRESS(OMAP34XX_IC_BASE);
>> + }
>> +#endif
>> omap_irq_bank_init_one(bank);
>>
>> nr_irqs += bank->nr_irqs;
>>
>
>You should be able to leave out the ifdefs above, if one of the omaps
>is disabled, then it will get optimized out as it will be if (0) {}.
In few more places I found this kind of issue. I think this kind of common definition issues will be more in future.
>This is assuming the _IC_BASE defines are visible to both, of course.
Basically we have omap24xx.h and omap34xx.h for OMAP2/3 specific definitions. Now for the above illustrated approach we should have two different definitions, where to define such Macros?
Note: We will not include omap24xx.h for 34xx compilation (vice versa).
Option 1: Having such Macros with same name in both 24xx and 34xx .h files
In omap24xx.h:
#define OMAP_IC_BASE <OMAP2 IC BASE VALUE>
In omap34xx.h
#define OMAP_IC_BASE < OMAP3 IC BASE VALUE >
Option 2: Having a separate header file for such macros.
omap_common.h
#define OMAP24XX_IC_BASE < OMAP2 IC BASE VALUE >
#define OMAP34XX_IC_BASE < OMAP3 IC BASE VALUE >
This common header file can be included in both 24xx and 34xx board files
Option 3: Define both macros in 24xx and 34xx header files (Crap).
In omap24xx.h:
#define OMAP24XX_IC_BASE < OMAP2 IC BASE VALUE >
#define OMAP34XX_IC_BASE < OMAP3 IC BASE VALUE >#define OMAP_IC_BASE
In omap34xx.h
#define OMAP24XX_IC_BASE < OMAP2 IC BASE VALUE >
#define OMAP34XX_IC_BASE < OMAP3 IC BASE VALUE >#define OMAP_IC_BASE
Kindly let me know your views on the same.
Regards,
Khasim
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 6 / 12] Mach omap2 updation for 3430
2007-06-14 21:03 ` Syed Mohammed, Khasim
@ 2007-06-15 8:13 ` Tony Lindgren
2007-06-15 13:40 ` Syed Mohammed, Khasim
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2007-06-15 8:13 UTC (permalink / raw)
To: Syed Mohammed, Khasim; +Cc: Linux OMAP
* Syed Mohammed, Khasim <x0khasim@ti.com> [070614 14:03]:
> Hi Tony,
>
> >> +#ifdef CONFIG_ARCH_OMAP24XX
> >> + if (cpu_is_omap24xx()) {
> >> + bank->base_reg = IO_ADDRESS(OMAP24XX_IC_BASE);
> >> + }
> >> +#endif
> >> +#ifdef CONFIG_ARCH_OMAP34XX
> >> + if (cpu_is_omap34xx()) {
> >> + bank->base_reg = IO_ADDRESS(OMAP34XX_IC_BASE);
> >> + }
> >> +#endif
> >> omap_irq_bank_init_one(bank);
> >>
> >> nr_irqs += bank->nr_irqs;
> >>
> >
> >You should be able to leave out the ifdefs above, if one of the omaps
> >is disabled, then it will get optimized out as it will be if (0) {}.
>
> In few more places I found this kind of issue. I think this kind of common definition issues will be more in future.
>
> >This is assuming the _IC_BASE defines are visible to both, of course.
>
> Basically we have omap24xx.h and omap34xx.h for OMAP2/3 specific definitions. Now for the above illustrated approach we should have two different definitions, where to define such Macros?
>
> Note: We will not include omap24xx.h for 34xx compilation (vice versa).
We can include them, it should not hurt as the defines have 24XX or
34XX prefix.
> Option 1: Having such Macros with same name in both 24xx and 34xx .h files
>
> In omap24xx.h:
> #define OMAP_IC_BASE <OMAP2 IC BASE VALUE>
>
> In omap34xx.h
> #define OMAP_IC_BASE < OMAP3 IC BASE VALUE >
>
> Option 2: Having a separate header file for such macros.
>
> omap_common.h
> #define OMAP24XX_IC_BASE < OMAP2 IC BASE VALUE >
> #define OMAP34XX_IC_BASE < OMAP3 IC BASE VALUE >
>
> This common header file can be included in both 24xx and 34xx board files
>
> Option 3: Define both macros in 24xx and 34xx header files (Crap).
>
> In omap24xx.h:
> #define OMAP24XX_IC_BASE < OMAP2 IC BASE VALUE >
> #define OMAP34XX_IC_BASE < OMAP3 IC BASE VALUE >#define OMAP_IC_BASE
>
> In omap34xx.h
> #define OMAP24XX_IC_BASE < OMAP2 IC BASE VALUE >
> #define OMAP34XX_IC_BASE < OMAP3 IC BASE VALUE >#define OMAP_IC_BASE
>
>
> Kindly let me know your views on the same.
Well I think option 2 or 3 may still be the best if we eventually want
to compile both 24xx and 34xx into the same kernel. Maybe just have it
defined in irq.c or .h if not needed elsewhere?
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: [PATCH 6 / 12] Mach omap2 updation for 3430
2007-06-15 8:13 ` Tony Lindgren
@ 2007-06-15 13:40 ` Syed Mohammed, Khasim
0 siblings, 0 replies; 5+ messages in thread
From: Syed Mohammed, Khasim @ 2007-06-15 13:40 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Linux OMAP
> Note: We will not include omap24xx.h for 34xx compilation (vice versa).
>We can include them, it should not hurt as the defines have 24XX or
> 34XX prefix.
This was giving compilation issues, when I tried. Have to double check.
> Option 1: Having such Macros with same name in both 24xx and 34xx .h files
>
> In omap24xx.h:
> #define OMAP_IC_BASE <OMAP2 IC BASE VALUE>
>
> In omap34xx.h
> #define OMAP_IC_BASE < OMAP3 IC BASE VALUE >
>
> Option 2: Having a separate header file for such macros.
>
> omap_common.h
> #define OMAP24XX_IC_BASE < OMAP2 IC BASE VALUE >
> #define OMAP34XX_IC_BASE < OMAP3 IC BASE VALUE >
>
> This common header file can be included in both 24xx and 34xx board files
>
> Option 3: Define both macros in 24xx and 34xx header files (Crap).
>
> In omap24xx.h:
> #define OMAP24XX_IC_BASE < OMAP2 IC BASE VALUE >
> #define OMAP34XX_IC_BASE < OMAP3 IC BASE VALUE >#define OMAP_IC_BASE
>
> In omap34xx.h
> #define OMAP24XX_IC_BASE < OMAP2 IC BASE VALUE >
> #define OMAP34XX_IC_BASE < OMAP3 IC BASE VALUE >#define OMAP_IC_BASE
>
>
> Kindly let me know your views on the same.
>Well I think option 2 or 3 may still be the best if we eventually want
>to compile both 24xx and 34xx into the same kernel. Maybe just have it
>defined in irq.c or .h if not needed elsewhere?
OK, I will work on one of these option. Can you consider this patch for first level merge. I will work on all other comments and submit them by next week.
If some thing gets changed on GIT, it will be hard to re-sync / re-post all these patches again :)
Regards,
Khasim
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-06-15 13:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-14 5:01 [PATCH 6 / 12] Mach omap2 updation for 3430 Syed Mohammed, Khasim
2007-06-14 11:46 ` Tony Lindgren
2007-06-14 21:03 ` Syed Mohammed, Khasim
2007-06-15 8:13 ` Tony Lindgren
2007-06-15 13:40 ` Syed Mohammed, Khasim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.