Skip to contentSkip to conversation

ARM: OMAP: Add core fsample support

PATCH In review Brian Swetland 4 participants 8 messages Apr 28, 2006 – May 15, 2006

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP: Add core fsample support

This patch adds core support for the TI F-Sample Board (OMAP 850).

arch/arm/mach-omap1/Kconfig +7 -0
@@ -63,6 +63,13 @@
 	  Support for TI OMAP 730 Perseus2 board. Say Y here if you have such
 	  a board.
 
+config MACH_OMAP_FSAMPLE
+	bool "TI F-Sample"
+	depends on ARCH_OMAP1 && ARCH_OMAP730
+    	help
+	  Support for TI OMAP 850 F-Sample board. Say Y here if you have such
+	  a board.
+
 config MACH_VOICEBLUE
 	bool "Voiceblue"
 	depends on ARCH_OMAP1 && ARCH_OMAP15XX
arch/arm/mach-omap1/Makefile +1 -0
@@ -17,6 +17,7 @@
 obj-$(CONFIG_MACH_OMAP_INNOVATOR)	+= board-innovator.o
 obj-$(CONFIG_MACH_OMAP_GENERIC)		+= board-generic.o
 obj-$(CONFIG_MACH_OMAP_PERSEUS2)	+= board-perseus2.o
+obj-$(CONFIG_MACH_OMAP_FSAMPLE)		+= board-fsample.o
 obj-$(CONFIG_MACH_OMAP_OSK)		+= board-osk.o
 obj-$(CONFIG_MACH_OMAP_H3)		+= board-h3.o
 obj-$(CONFIG_MACH_VOICEBLUE)		+= board-voiceblue.o
arch/arm/mach-omap1/board-fsample.c +319 -0

319 lines not on this page · raw message

arch/arm/mach-omap1/clock.c +14 -4
@@ -1,3 +1,4 @@
+//kernel/linux-omap-fsample/arch/arm/mach-omap1/clock.c#2 - edit change 3808 (text)
 /*
  *  linux/arch/arm/mach-omap1/clock.c
  *
@@ -20,6 +21,7 @@
 
 #include <asm/io.h>
 
+#include <asm/arch/cpu.h>
 #include <asm/arch/usb.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sram.h>
@@ -270,8 +272,12 @@
 	/*
 	 * In most cases we should not need to reprogram DPLL.
 	 * Reprogramming the DPLL is tricky, it must be done from SRAM.
+	 * (on 730, bit 13 must always be 1)
 	 */
-	omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val);
+	if (cpu_is_omap730())
+		omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val | 0x2000);
+	else
+		omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val);
 
 	ck_dpll1.rate = ptr->pll_rate;
 	propagate_rate(&ck_dpll1);
@@ -748,7 +754,7 @@
 		printk(KERN_ERR "System frequencies not set. Check your config.\n");
 		/* Guess sane values (60MHz) */
 		omap_writew(0x2290, DPLL_CTL);
-		omap_writew(0x1005, ARM_CKCTL);
+		omap_writew(cpu_is_omap730() ? 0x3005 : 0x1005, ARM_CKCTL);
 		ck_dpll1.rate = 60000000;
 		propagate_rate(&ck_dpll1);
 	}
@@ -761,13 +767,17 @@
 	       ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10,
 	       arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
 
-#ifdef CONFIG_MACH_OMAP_PERSEUS2
+#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE)
 	/* Select slicer output as OMAP input clock */
 	omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL);
 #endif
 
 	/* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
-	omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
+	/* (on 730, bit 13 must not be cleared) */
+	if (cpu_is_omap730())
+		omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL);
+	else
+		omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
 
 	/* Put DSP/MPUI into reset until needed */
 	omap_writew(0, ARM_RSTCT1);
arch/arm/mach-omap1/pm.c +5 -2
@@ -1,3 +1,4 @@
+//kernel/linux-omap-fsample/arch/arm/mach-omap1/pm.c#3 - integrate change 4545 (text)
 /*
  * linux/arch/arm/mach-omap1/pm.c
  *
@@ -50,6 +51,7 @@
 #include <asm/mach/irq.h>
 #include <asm/mach-types.h>
 
+#include <asm/arch/cpu.h>
 #include <asm/arch/irqs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sram.h>
@@ -326,8 +328,9 @@
 	/* stop DSP */
 	omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1);
 
-	/* shut down dsp_ck */
-	omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL);
+		/* shut down dsp_ck */
+	if (!cpu_is_omap730())
+		omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL);
 
 	/* temporarily enabling api_ck to access DSP registers */
 	omap_writew(omap_readw(ARM_IDLECT2) | 1 << EN_APICK, ARM_IDLECT2);
arch/arm/mach-omap1/time.c +1 -1
@@ -94,7 +94,7 @@
  * will break. On P2, the timer count rate is 6.5 MHz after programming PTV
  * with 0. This divides the 13MHz input by 2, and is undocumented.
  */
-#ifdef CONFIG_MACH_OMAP_PERSEUS2
+#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE)
 /* REVISIT: This ifdef construct should be replaced by a query to clock
  * framework to see if timer base frequency is 12.0, 13.0 or 19.2 MHz.
  */
arch/arm/plat-omap/devices.c +1 -1
@@ -105,7 +105,7 @@
 		omap_cfg_reg(E20_1610_KBR3);
 		omap_cfg_reg(E19_1610_KBR4);
 		omap_cfg_reg(N19_1610_KBR5);
-	} else if (machine_is_omap_perseus2()) {
+	} else if (machine_is_omap_perseus2() || machine_is_omap_fsample()) {
 		omap_cfg_reg(E2_730_KBR0);
 		omap_cfg_reg(J7_730_KBR1);
 		omap_cfg_reg(E1_730_KBR2);
include/asm-arm/arch-omap/board-fsample.h +51 -0

51 lines not on this page · raw message

include/asm-arm/arch-omap/hardware.h +4 -0
@@ -298,6 +298,10 @@
 #include "board-perseus2.h"
 #endif
 
+#ifdef CONFIG_MACH_OMAP_FSAMPLE
+#include "board-fsample.h"
+#endif
+
 #ifdef CONFIG_MACH_OMAP_H3
 #include "board-h3.h"
 #endif
#1 lore raw
Quoted 2 lines · Brian Swetland

This patch adds core support for the TI F-Sample Board (OMAP 850).

Hi Brian,

Seems like you should add a separate CPU: OMAP850 at the same time. Shouldn't be too much more work.

Is the OMAP850 currently detected exactly like the 730 via the JTAG ID (see arch/arm/mach-omap1/id.c)

Sorry I couldn't comment on this sooner.

Kevin

reviewer
#2 lore raw
Quoted 2 lines · Kevin Hilman
Quoted 1 line · Brian Swetland

This patch adds core support for the TI F-Sample Board (OMAP 850).

Pushing this today.

Quoted 9 lines

Hi Brian,

Seems like you should add a separate CPU: OMAP850 at the same time. Shouldn't be too much more work.

Is the OMAP850 currently detected exactly like the 730 via the JTAG ID (see arch/arm/mach-omap1/id.c)

Sorry I couldn't comment on this sooner.

This would be a nice patch to have.

Tony

#3 lore raw
Quoted 5 lines · --- Tony Lindgren
Quoted 2 lines · Kevin Hilman
Quoted 1 line · Brian Swetland

This patch adds core support for the TI F-Sample Board (OMAP 850).

Pushing this today.

Please check the board-fsample.c in gitweb now :)
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blob;h=6a9b75776bc781c713b9905a058b8193fc4eaf0b;hb=bb236d9666442f98d955000abbb1b88d59ae42d4;f=arch/arm/mach-omap1/board-fsample.c

---Komal Shah
http://komalshah.blogspot.com/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#4 lore raw

[Komal Shah <[email protected]>]

Quoted 10 lines
Quoted 5 lines · --- Tony Lindgren
Quoted 2 lines · Kevin Hilman
Quoted 1 line · Brian Swetland

This patch adds core support for the TI F-Sample Board (OMAP 850).

Pushing this today.

Please check the board-fsample.c in gitweb now :)
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blob;h=6a9b75776bc781c713b9905a058b8193fc4eaf0b;hb=bb236d9666442f98d955000abbb1b88d59ae42d4;f=arch/arm/mach-omap1/board-fsample.c

Looks like it happened to board-fsample.h as well:
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blob;h=c0399906636ea5ffaa71b06440dd4c8085a6fe76;hb=bb236d9666442f98d955000abbb1b88d59ae42d4;f=include/asm-arm/arch-omap/board-fsample.h

The other files in the patch look okay.

Brian

#7 lore raw
In reply to Tony Lindgren

[Tony Lindgren <[email protected]>]

Quoted 11 lines
Quoted 9 lines

Hi Brian,

Seems like you should add a separate CPU: OMAP850 at the same time. Shouldn't be too much more work.

Is the OMAP850 currently detected exactly like the 730 via the JTAG ID (see arch/arm/mach-omap1/id.c)

Sorry I couldn't comment on this sooner.

This would be a nice patch to have.

Shouldn't be hard to do. A few cpu_is_omap730()s will have to become cpu_is_omap_7xx()s, I supppose (for behaviour common to 730 and 850).

Brian

reviewer
#5 lore raw
In reply to Brian Swetland
Quoted 9 lines · Brian Swetland

[Komal Shah <[email protected]>]

Quoted 8 lines
Quoted 5 lines · --- Tony Lindgren
Quoted 2 lines · Kevin Hilman
Quoted 1 line · Brian Swetland

This patch adds core support for the TI F-Sample Board (OMAP 850).

Pushing this today.

Quoted 7 lines
Quoted 2 lines

Please check the board-fsample.c in gitweb now :)
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blob;h=6a9b75776bc781c713b9905a058b8193fc4eaf0b;hb=bb236d9666442f98d955000abbb1b88d59ae42d4;f=arch/arm/mach-omap1/board-fsample.c

Looks like it happened to board-fsample.h as well:
http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blob;h=c0399906636ea5ffaa71b06440dd4c8085a6fe76;hb=bb236d9666442f98d955000abbb1b88d59ae42d4;f=include/asm-arm/arch-omap/board-fsample.h

The other files in the patch look okay.

Strange :) I've reverted it and re-applied. Can you check it now?

Tony

#6 lore raw

[Tony Lindgren <[email protected]>]

Quoted 9 lines · Brian Swetland
Quoted 6 lines
Quoted 2 lines

Please check the board-fsample.c in gitweb now :)

Looks like it happened to board-fsample.h as well:

The other files in the patch look okay.

Strange :) I've reverted it and re-applied. Can you check it now?

Looks good now (both in gitweb and locally after a cg-update).

Brian