fsample support patch (core omap only)
Subsystems (5)
Here's a revised version of my original patch, using cpu_is_*() and only including the core omap files.
Device patches to follow.
Brian
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
arch/arm/tools/mach-types +2 -0
@@ -969,3 +969,5 @@ fujitsu_wimaxsoc MACH_FUJITSU_WIMAXSOC FUJITSU_WIMAXSOC 956 dualpcmodem MACH_DUALPCMODEM DUALPCMODEM 957 gesbc9312 MACH_GESBC9312 GESBC9312 958 +omap_fsample MACH_OMAP_FSAMPLE OMAP_FSAMPLE 970 +
[email protected]
reviewerQuoted 3 lines · Brian Swetland
Here's a revised version of my original patch, using cpu_is_*() and only including the core omap files.
Looks good & sorry for delay in replying. Just few more nitpicking comments to make the patch usable for sending upstream as-is:
- Please repost with subject: [PATCH] ARM: OMAP: Add core fsample support
- Then body that says something like "This patch adds core fsample support", and add Signed-off-by line
- Please separate arch/arm/tools/mach-types into yet another separate patch as we don't need to send that chunk upstream
And just to recap, we want to have core omap support in sync with mainline and want to produce patches that work against the mainline tree without rewriting :)
Quoted 1 line
Device patches to follow.
Great!
Tony