* [PATCH] Resubmitting 2430 Support - 2430 include/asm-arm/arch-omap
@ 2006-11-10 19:09 Syed Mohammed, Khasim
2006-11-10 19:36 ` [PATCH] H4 / 2430SDP ethernet IRQ flags fix Syed Mohammed, Khasim
0 siblings, 1 reply; 5+ messages in thread
From: Syed Mohammed, Khasim @ 2006-11-10 19:09 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 218 bytes --]
Hi Tony,
The attached patch is for include/asm-arm/arch-omap directory. Very few
headers were updated, mainly for base address changes. The IRQ list has
to be updated for OMAP2430.
Thanks & Regards,
Khasim
[-- Attachment #2: include_2430support.patch --]
[-- Type: application/octet-stream, Size: 5646 bytes --]
This patch adds minimal OMAP2430 support to get the kernel booting on 2430SDP.
Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
Files Changed:
board-2430sdp.h | 41 +++++++++++++++++++++++++++++++++++++++++
hardware.h | 4 ++++
io.h | 10 ++++++++++
irqs.h | 1 +
omap24xx.h | 10 ++++++++++
5 files changed, 66 insertions(+)
=============================================================================
diff -purN linux-omap/include/asm-arm/arch-omap/board-2430sdp.h dev-linux-omap-2.6.git/include/asm-arm/arch-omap/board-2430sdp.h
--- linux-omap/include/asm-arm/arch-omap/board-2430sdp.h 1969-12-31 18:00:00.000000000 -0600
+++ dev-linux-omap-2.6.git/include/asm-arm/arch-omap/board-2430sdp.h 2006-11-10 12:05:57.000000000 -0600
@@ -0,0 +1,41 @@
+/*
+ * linux/include/asm-arm/arch-omap/board-2430sdp.h
+ *
+ * Hardware definitions for TI OMAP2430 SDP board.
+ *
+ * Based on board-h4.h by Dirk Behme <dirk.behme@de.bosch.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ASM_ARCH_OMAP_2430SDP_H
+#define __ASM_ARCH_OMAP_2430SDP_H
+
+/* Placeholder for 2430SDP specific defines */
+#define OMAP24XX_ETHR_START 0x08000300
+#define OMAP24XX_ETHR_GPIO_IRQ 149
+#define SDP2430_CS0_BASE 0x04000000
+
+/*
+ * Just a place holder, need to add more
+ */
+
+#endif /* __ASM_ARCH_OMAP_2430SDP_H */
diff -purN linux-omap/include/asm-arm/arch-omap/hardware.h dev-linux-omap-2.6.git/include/asm-arm/arch-omap/hardware.h
--- linux-omap/include/asm-arm/arch-omap/hardware.h 2006-11-02 00:17:06.000000000 -0600
+++ dev-linux-omap-2.6.git/include/asm-arm/arch-omap/hardware.h 2006-11-10 12:05:36.000000000 -0600
@@ -318,6 +318,10 @@
#include "board-h4.h"
#endif
+#ifdef CONFIG_MACH_OMAP_2430SDP
+#include "board-2430sdp.h"
+#endif
+
#ifdef CONFIG_MACH_OMAP_APOLLON
#include "board-apollon.h"
#endif
diff -purN linux-omap/include/asm-arm/arch-omap/io.h dev-linux-omap-2.6.git/include/asm-arm/arch-omap/io.h
--- linux-omap/include/asm-arm/arch-omap/io.h 2006-11-02 00:17:06.000000000 -0600
+++ dev-linux-omap-2.6.git/include/asm-arm/arch-omap/io.h 2006-11-10 12:05:36.000000000 -0600
@@ -72,6 +72,16 @@
#define L4_24XX_PHYS L4_24XX_BASE /* 0x48000000 */
#define L4_24XX_VIRT 0xd8000000
#define L4_24XX_SIZE SZ_1M /* 1MB of 128MB used, want 1MB sect */
+
+#ifdef CONFIG_ARCH_OMAP2430
+#define L4_WK_243X_PHYS L4_WK_243X_BASE /* 0x49000000 */
+#define L4_WK_243X_VIRT 0xd9000000
+#define L4_WK_243X_SIZE SZ_1M
+#define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE /* 0x49000000 */
+#define OMAP243X_GPMC_VIRT 0xFE000000
+#define OMAP243X_GPMC_SIZE SZ_1M
+#endif
+
#define IO_OFFSET 0x90000000
#define IO_ADDRESS(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
diff -purN linux-omap/include/asm-arm/arch-omap/irqs.h dev-linux-omap-2.6.git/include/asm-arm/arch-omap/irqs.h
--- linux-omap/include/asm-arm/arch-omap/irqs.h 2006-11-02 00:17:06.000000000 -0600
+++ dev-linux-omap-2.6.git/include/asm-arm/arch-omap/irqs.h 2006-11-10 12:05:36.000000000 -0600
@@ -249,6 +249,7 @@
#define INT_24XX_GPIO_BANK2 30
#define INT_24XX_GPIO_BANK3 31
#define INT_24XX_GPIO_BANK4 32
+#define INT_24XX_GPIO_BANK5 33
#define INT_24XX_MAIL_U3_MPU 34
#define INT_24XX_GPTIMER1 37
#define INT_24XX_GPTIMER2 38
diff -purN linux-omap/include/asm-arm/arch-omap/omap24xx.h dev-linux-omap-2.6.git/include/asm-arm/arch-omap/omap24xx.h
--- linux-omap/include/asm-arm/arch-omap/omap24xx.h 2006-11-02 00:17:06.000000000 -0600
+++ dev-linux-omap-2.6.git/include/asm-arm/arch-omap/omap24xx.h 2006-11-10 12:13:21.000000000 -0600
@@ -8,6 +8,7 @@
*/
#define L4_24XX_BASE 0x48000000
+#define L4_WK_243X_BASE 0x49000000
#define L3_24XX_BASE 0x68000000
/* interrupt controller */
@@ -16,11 +17,20 @@
#define OMAP24XX_IVA_INTC_BASE 0x40000000
#define IRQ_SIR_IRQ 0x0040
+#ifdef CONFIG_ARCH_OMAP2420
#define OMAP24XX_32KSYNCT_BASE (L4_24XX_BASE + 0x4000)
#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000)
#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000)
+#define OMAP242X_CONTROL_STATUS (L4_24XX_BASE + 0x2f8)
+#endif
+#ifdef CONFIG_ARCH_OMAP2430
+#define OMAP24XX_32KSYNCT_BASE (L4_WK_243X_BASE + 0x20000)
+#define OMAP24XX_PRCM_BASE (L4_WK_243X_BASE + 0x6000)
+#define OMAP24XX_SDRC_BASE (0x6D000000)
#define OMAP242X_CONTROL_STATUS (L4_24XX_BASE + 0x2f8)
+#define OMAP243X_GPMC_BASE 0x6E000000
+#endif
/* DSP SS */
#define OMAP24XX_DSP_BASE 0x58000000
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] H4 / 2430SDP ethernet IRQ flags fix
2006-11-10 19:09 [PATCH] Resubmitting 2430 Support - 2430 include/asm-arm/arch-omap Syed Mohammed, Khasim
@ 2006-11-10 19:36 ` Syed Mohammed, Khasim
2006-11-15 23:25 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Syed Mohammed, Khasim @ 2006-11-10 19:36 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 197 bytes --]
Hi Tony,
The attached patch configures the Ethernet IRQ flag on H4 / 2430SDP to
IRQF_TRIGGER_LOW
This has been tested and validated on 2430 SDP and H4 board.
Thanks & Regards,
Khasim
[-- Attachment #2: ethernet_fix_H4_2430.patch --]
[-- Type: application/octet-stream, Size: 1074 bytes --]
This patch configures the Ethernet IRQ flag on H4 / 2430SDP to IRQF_TRIGGER_LOW.
Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
Files changed:
smc91x.h | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
==============================================================================
diff -purN linux-omap/drivers/net/smc91x.h dev-linux-omap-2.6.git/drivers/net/smc91x.h
--- linux-omap/drivers/net/smc91x.h 2006-11-02 00:16:21.000000000 -0600
+++ dev-linux-omap-2.6.git/drivers/net/smc91x.h 2006-11-10 13:22:53.000000000 -0600
@@ -193,11 +193,12 @@ SMC_outw(u16 val, void __iomem *ioaddr,
#include <asm/arch/cpu.h>
#define SMC_IRQ_FLAGS (( \
- machine_is_omap_h2() \
+ machine_is_omap_h2() \
|| machine_is_omap_h3() \
- || machine_is_omap_h4() \
|| (machine_is_omap_innovator() && !cpu_is_omap1510()) \
- ) ? IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING)
+ )? IRQF_TRIGGER_FALLING : \
+ ((machine_is_omap_h4() || machine_is_omap_2430sdp())? \
+ IRQF_TRIGGER_LOW : IRQF_TRIGGER_RISING))
#elif defined(CONFIG_SH_SH4202_MICRODEV)
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] H4 / 2430SDP ethernet IRQ flags fix
2006-11-10 19:36 ` [PATCH] H4 / 2430SDP ethernet IRQ flags fix Syed Mohammed, Khasim
@ 2006-11-15 23:25 ` Tony Lindgren
2006-11-15 23:35 ` Syed Mohammed, Khasim
0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2006-11-15 23:25 UTC (permalink / raw)
To: Syed Mohammed, Khasim; +Cc: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]
Hi,
* Syed Mohammed, Khasim <x0khasim@ti.com> [061110 21:42]:
>
> Hi Tony,
>
> The attached patch configures the Ethernet IRQ flag on H4 / 2430SDP to
> IRQF_TRIGGER_LOW
>
> This has been tested and validated on 2430 SDP and H4 board.
>
> Thanks & Regards,
> Khasim
Content-Description: ethernet_fix_H4_2430.patch
> This patch configures the Ethernet IRQ flag on H4 / 2430SDP to IRQF_TRIGGER_LOW.
>
> Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
>
> Files changed:
> smc91x.h | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> ==============================================================================
> diff -purN linux-omap/drivers/net/smc91x.h dev-linux-omap-2.6.git/drivers/net/smc91x.h
> --- linux-omap/drivers/net/smc91x.h 2006-11-02 00:16:21.000000000 -0600
> +++ dev-linux-omap-2.6.git/drivers/net/smc91x.h 2006-11-10 13:22:53.000000000 -0600
> @@ -193,11 +193,12 @@ SMC_outw(u16 val, void __iomem *ioaddr,
> #include <asm/arch/cpu.h>
>
> #define SMC_IRQ_FLAGS (( \
> - machine_is_omap_h2() \
> + machine_is_omap_h2() \
> || machine_is_omap_h3() \
> - || machine_is_omap_h4() \
> || (machine_is_omap_innovator() && !cpu_is_omap1510()) \
> - ) ? IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING)
> + )? IRQF_TRIGGER_FALLING : \
> + ((machine_is_omap_h4() || machine_is_omap_2430sdp())? \
> + IRQF_TRIGGER_LOW : IRQF_TRIGGER_RISING))
>
>
> #elif defined(CONFIG_SH_SH4202_MICRODEV)
Well it's getting messy, and now we need to patch it when new machines
are added.
How about something like the following patch? Does the following patch
work for you?
Regards,
Tony
[-- Attachment #2: patch-omap-smc-trigger --]
[-- Type: text/plain, Size: 964 bytes --]
smc91x: Clean up omap interrupt level
Since omap1 does not have level GPIO interrupts, all omap1 class
processors should use falling edge, except for Innovator which
routes the interrupt via FPGA and needs rising edge. All omap2
class processors should use low level interrupt.
Signed-off-by: Tony Lindgren <tony@atomide.com>
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -192,13 +192,12 @@ #define SMC_outsw(a, r, p, l) writesw((a
#include <asm/mach-types.h>
#include <asm/arch/cpu.h>
-#define SMC_IRQ_FLAGS (( \
- machine_is_omap_h2() \
- || machine_is_omap_h3() \
- || machine_is_omap_h4() \
- || (machine_is_omap_innovator() && !cpu_is_omap1510()) \
- ) ? IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING)
-
+#ifdef CONFIG_ARCH_OMAP1
+#define SMC_IRQ_FLAGS (machine_is_omap_innovator() ? IRQF_TRIGGER_RISING : \
+ IRQF_TRIGGER_FALLING)
+#else
+#define SMC_IRQ_FLAGS IRQF_TRIGGER_LOW
+#endif
#elif defined(CONFIG_SH_SH4202_MICRODEV)
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] H4 / 2430SDP ethernet IRQ flags fix
2006-11-15 23:25 ` Tony Lindgren
@ 2006-11-15 23:35 ` Syed Mohammed, Khasim
2006-11-16 0:32 ` Tony Lindgren
0 siblings, 1 reply; 5+ messages in thread
From: Syed Mohammed, Khasim @ 2006-11-15 23:35 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap-open-source
Hi Tony,
+#ifdef CONFIG_ARCH_OMAP1
+#define SMC_IRQ_FLAGS (machine_is_omap_innovator() ?
IRQF_TRIGGER_RISING : \
+ IRQF_TRIGGER_FALLING)
+#else
+#define SMC_IRQ_FLAGS IRQF_TRIGGER_LOW
+#endif
This looks fine to me, please push this one.
Regards,
Khasim
-----Original Message-----
From: Tony Lindgren [mailto:tony@atomide.com]
Sent: Wednesday, November 15, 2006 5:25 PM
To: Syed Mohammed, Khasim
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH] H4 / 2430SDP ethernet IRQ flags fix
Hi,
* Syed Mohammed, Khasim <x0khasim@ti.com> [061110 21:42]:
>
> Hi Tony,
>
> The attached patch configures the Ethernet IRQ flag on H4 / 2430SDP to
> IRQF_TRIGGER_LOW
>
> This has been tested and validated on 2430 SDP and H4 board.
>
> Thanks & Regards,
> Khasim
Content-Description: ethernet_fix_H4_2430.patch
> This patch configures the Ethernet IRQ flag on H4 / 2430SDP to
IRQF_TRIGGER_LOW.
>
> Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com>
>
> Files changed:
> smc91x.h | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
>
========================================================================
======
> diff -purN linux-omap/drivers/net/smc91x.h
dev-linux-omap-2.6.git/drivers/net/smc91x.h
> --- linux-omap/drivers/net/smc91x.h 2006-11-02 00:16:21.000000000
-0600
> +++ dev-linux-omap-2.6.git/drivers/net/smc91x.h 2006-11-10
13:22:53.000000000 -0600
> @@ -193,11 +193,12 @@ SMC_outw(u16 val, void __iomem *ioaddr,
> #include <asm/arch/cpu.h>
>
> #define SMC_IRQ_FLAGS (( \
> - machine_is_omap_h2() \
> + machine_is_omap_h2() \
> || machine_is_omap_h3() \
> - || machine_is_omap_h4() \
> || (machine_is_omap_innovator() && !cpu_is_omap1510()) \
> - ) ? IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING)
> + )? IRQF_TRIGGER_FALLING : \
> + ((machine_is_omap_h4() || machine_is_omap_2430sdp())? \
> + IRQF_TRIGGER_LOW : IRQF_TRIGGER_RISING))
>
>
> #elif defined(CONFIG_SH_SH4202_MICRODEV)
Well it's getting messy, and now we need to patch it when new machines
are added.
How about something like the following patch? Does the following patch
work for you?
Regards,
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] H4 / 2430SDP ethernet IRQ flags fix
2006-11-15 23:35 ` Syed Mohammed, Khasim
@ 2006-11-16 0:32 ` Tony Lindgren
0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2006-11-16 0:32 UTC (permalink / raw)
To: Syed Mohammed, Khasim; +Cc: linux-omap-open-source
* Syed Mohammed, Khasim <x0khasim@ti.com> [061116 01:36]:
> Hi Tony,
>
> +#ifdef CONFIG_ARCH_OMAP1
> +#define SMC_IRQ_FLAGS (machine_is_omap_innovator() ?
> IRQF_TRIGGER_RISING : \
> + IRQF_TRIGGER_FALLING)
> +#else
> +#define SMC_IRQ_FLAGS IRQF_TRIGGER_LOW
> +#endif
>
> This looks fine to me, please push this one.
Thanks, pushed.
Regards,
Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-11-16 0:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-10 19:09 [PATCH] Resubmitting 2430 Support - 2430 include/asm-arm/arch-omap Syed Mohammed, Khasim
2006-11-10 19:36 ` [PATCH] H4 / 2430SDP ethernet IRQ flags fix Syed Mohammed, Khasim
2006-11-15 23:25 ` Tony Lindgren
2006-11-15 23:35 ` Syed Mohammed, Khasim
2006-11-16 0:32 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox