linux-stable/arch/arm
Krzysztof Halasa 5dbc46506a IXP42x HSS support for setting internal clock rate
HSS usually uses external clocks, so it's not a big deal. Internal clock
is used for direct DTE-DTE connections and when the DCE doesn't provide
it's own clock.

This also depends on the oscillator frequency. Intel seems to have
calculated the clock register settings for 33.33 MHz (66.66 MHz timer
base). Their settings seem quite suboptimal both in terms of average
frequency (60 ppm is unacceptable for G.703 applications, their primary
intended usage(?)) and jitter.

Many (most?) platforms use a 33.333 MHz oscillator, a 10 ppm difference
from Intel's base.

Instead of creating static tables, I've created a procedure to program
the HSS clock register. The register consists of 3 parts (A, B, C).
The average frequency (= bit rate) is:
66.66x MHz / (A  + (B + 1) / (C + 1))
The procedure aims at the closest average frequency, possibly at the
cost of increased jitter. Nobody would be able to directly drive an
unbufferred transmitter with a HSS anyway, and the frequency error is
what it really counts.

I've verified the above with an oscilloscope on IXP425. It seems IXP46x
and possibly IXP43x use a bit different clock generation algorithm - it
looks like the avg frequency is:
(on IXP465) 66.66x MHz / (A  + B / (C + 1)).
Also they use much greater precomputed A and B - on IXP425 it would
simply result in more jitter, but I don't know how does it work on
IXP46x (perhaps 3 least significant bits aren't used?).

Anyway it looks that they were aiming for exactly +60 ppm or -60 ppm,
while <1 ppm is typically possible (with a synchronized clock, of
course).

The attached patch makes it possible to set almost any bit rate
(my IXP425 533 MHz quits at > 22 Mb/s if a single port is used, and the
minimum is ca. 65 Kb/s).

This is independent of MVIP (multi-E1/T1 on one HSS) mode.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-07 01:56:49 -07:00
..
boot ARM: includecheck fix: misc.c 2009-07-25 17:07:00 +01:00
common ARM: 5639/1: arm: clkdev.c should include <linux/clk.h> 2009-08-05 22:06:58 +01:00
configs USB: musb: fix the nop registration for OMAP3EVM 2009-08-07 16:05:13 -07:00
include/asm Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-08-12 17:44:53 -07:00
kernel ARM: 5638/1: arch/arm/kernel/signal.c: use correct address space for CRUNCH 2009-08-05 22:06:58 +01:00
lib Merge branch 'copy_user' of git://git.marvell.com/orion into devel 2009-06-14 10:59:32 +01:00
mach-aaec2000 [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-at91 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2009-07-30 16:46:31 -07:00
mach-clps711x [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-davinci ARM: includecheck fix: board-sffsdr.c 2009-07-25 17:07:02 +01:00
mach-ebsa110 [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-ep93xx [ARM] 5611/1: ep93xx: update ts72xx nor flash support 2009-07-23 10:21:24 +01:00
mach-footbridge [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-gemini Gemini: Fix SRAM/ROM location after memory swap 2009-05-28 16:42:25 +03:00
mach-h720x [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-integrator [ARM] 5517/1: integrator: don't put clock lookups in __initdata 2009-05-18 17:43:16 +01:00
mach-iop13xx dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) 2009-04-07 08:31:10 -07:00
mach-iop32x [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-iop33x [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-ixp4xx IXP42x HSS support for setting internal clock rate 2009-09-07 01:56:49 -07:00
mach-ixp23xx [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-ixp2000 [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-kirkwood [ARM] Kirkwood: Correct header define 2009-07-06 23:54:56 -04:00
mach-ks8695 ARM: 5637/1: [KS8695] Don't reference CLOCK_TICK_RATE in drivers 2009-08-05 22:06:56 +01:00
mach-l7200 [ARM] mach-l7200: fix spelling of SYS_CLOCK_OFF 2009-05-18 11:25:08 +01:00
mach-lh7a40x [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-loki [ARM] add coherent DMA mask for mv643xx_eth 2009-05-22 17:05:53 -04:00
mach-mmp [ARM] pxa: add PWM devices support for pxa168/910 2009-06-05 10:32:06 +08:00
mach-msm clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
mach-mv78xx0 [ARM] orion: convert gpio to use gpiolib 2009-06-08 13:04:57 -04:00
mach-mx1 mx1ads: rename mxc_map_io to mx1_map_io 2009-05-07 16:20:22 +02:00
mach-mx2 Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2009-06-14 13:42:43 -07:00
mach-mx3 ARM: add support for the EET board, based on the i.MX31 pcm037 module 2009-06-23 14:25:26 +02:00
mach-netx [ARM] VIC: Add power management device 2009-05-07 11:04:57 +01:00
mach-ns9xxx clocksource: pass clocksource to read() callback 2009-04-21 13:41:47 -07:00
mach-omap1 ARM: includecheck fix: mach-omap1/mcbsp.c 2009-07-25 17:08:22 +01:00
mach-omap2 USB: musb: fix the nop registration for OMAP3EVM 2009-08-07 16:05:13 -07:00
mach-orion5x [ARM] orion5x: register the crypto device on SOCs that support it 2009-06-15 00:37:08 -04:00
mach-pnx4008 [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-pxa Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 2009-07-30 10:46:12 +01:00
mach-realview ARM: Realview & Versatile: Fix i2c_board_info definitions 2009-07-18 17:08:59 +01:00
mach-rpc [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-s3c24a0/include/mach
mach-s3c2400 [ARM] S3C24XX: GPIO: Fix error returns from gpio functions 2009-05-18 19:40:18 +01:00
mach-s3c2410 S3C24XX: GPIO: Fix pin range check in s3c_gpiolib_getchip 2009-07-29 23:47:14 +01:00
mach-s3c2412 Merge branch for-rmk-devel of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2009-06-10 22:41:06 +01:00
mach-s3c2440 [ARM] MINI2440: Add missing flash_bbt flat to NAND 2009-06-23 18:23:27 +01:00
mach-s3c2442 [ARM] GTA02: build fixes (s3c2410_nand_set usage) 2009-06-24 00:10:46 +01:00
mach-s3c2443 [ARM] S3C24XX: DMA: Split hardware regs out of <mach/dma.h> 2009-05-01 11:39:06 +01:00
mach-s3c6400 Merge branch for-rmk-devel of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2009-06-10 22:41:06 +01:00
mach-s3c6410 [ARM] SMDK6410: Add USB high-speed/OtG gadget device 2009-05-16 22:14:09 +01:00
mach-sa1100 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-06-14 13:46:25 -07:00
mach-shark [ARM] pass reboot command line to arch_reset() 2009-03-19 16:20:24 +00:00
mach-stmp37xx [ARM] 5539/1: Freescale STMP: onboard devices declaration 2009-06-04 14:16:45 +01:00
mach-stmp378x [ARM] 5539/1: Freescale STMP: onboard devices declaration 2009-06-04 14:16:45 +01:00
mach-u300 [ARM] 5594/1: Correct U300 VIC init PM setting 2009-07-09 16:15:46 +01:00
mach-versatile ARM: Realview & Versatile: Fix i2c_board_info definitions 2009-07-18 17:08:59 +01:00
mach-w90x900 [ARM] 5549/1: Add clock api for w90p910 platform. 2009-06-11 14:45:18 +01:00
mm [ARM] export __cpu_flush_dcache_page 2009-07-05 15:25:00 +01:00
nwfpe [ARM] nwfpe: fix 'floatx80_is_nan' sparse warning 2009-05-15 12:49:14 +01:00
oprofile RealView: Move the IRQ_* definitions out of the board-*.h files 2009-05-30 14:00:17 +01:00
plat-iop dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
plat-mxc pcm037: add MT9T031 camera support 2009-06-23 14:25:26 +02:00
plat-omap OMAP: Fix IOMEM macro for assembly 2009-06-23 16:56:05 +03:00
plat-orion [ARM] Orion/Kirkwood: rename orion5x_wdt to orion_wdt 2009-06-08 13:05:00 -04:00
plat-pxa [ARM] pxa: use kzalloc() in pxa_init_gpio_chip() 2009-07-03 14:17:51 +08:00
plat-s3c [ARM] S3C: Fix S3C24XX build to not include s3c64xx IIS devices 2009-06-23 16:34:35 +01:00
plat-s3c24xx ARM: S3C: PWM fix for low duty cycle 2009-07-30 23:54:50 +01:00
plat-s3c64xx Merge branch 's3c-fixes-rc4' of git://aeryn.fluff.org.uk/bjdooks/linux 2009-07-30 10:47:55 +01:00
plat-stmp3xxx ARM: includecheck fix: plat-stmp3xxx/pinmux.c 2009-07-25 17:08:24 +01:00
tools [ARM] Update mach-types 2009-06-20 22:28:41 +01:00
vfp Fix the VFP handling on the Feroceon CPU 2009-05-30 14:00:18 +01:00
Kconfig [ARM] S3C64XX: Initial support for DVFS 2009-06-16 23:36:24 +01:00
Kconfig-nommu
Kconfig.debug [ARM] S3C: Remove unused CONFIG_DEBUG_S3C_PORT 2009-06-23 12:24:07 +01:00
Makefile Merge branch 'u300' into devel 2009-06-14 11:01:44 +01:00