login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
16
Re: [PATCH] [MTD] [NAND] pxa3xx: fix ns2cycle equation
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Eric Miao
Subject:
Re: [PATCH] [MTD] [NAND] pxa3xx: fix ns2cycle equation
Date: Monday, August 16, 2010 - 5:14 am
On Mon, Aug 16, 2010 at 6:32 PM, David Woodhouse <dwmw2@infradead.org> wrote:
quoted text
> On Mon, 2010-08-16 at 16:09 +0800, Axel Lin wrote: >> Test on a PXA310 platform with Samsung K9F2G08X0B NAND flash, >> with tCH=5 and clk is 156MHz, ns2cycle(5, 156000000) returns -1. >> >> ns2cycle returns negtive value will break NDTR0_tXX macros. >> >> After checking the commit log, I found the problem is introduced by >> commit 5b0d4d7c8a67c5ba3d35e6ceb0c5530cc6846db7 >> "[MTD] [NAND] pxa3xx: convert from ns to clock ticks more accurately" >> >> To get num of clock cycles, we use below equation: >> num of clock cycles = time (ns) / one clock cycle (ns) + 1 >> We need to add 1 cycle here because integer division will truncate the result. >> It is possible the developers set the Min values in SPEC for timing settings. >> Thus the truncate may cause problem, and it is safe to add an extra cycle here. >> >> The various fields in NDTR{01} are in units of clock ticks minus one, >> thus we should subtract 1 cycle then. >> >> Thus the correct equation should be: >> num of clock cycles = time (ns) / one clock cycle (ns) + 1 - 1 >> = time (ns) / one clock cycle (ns) > > Looks sane to me; thanks. Wants to go to stable@ too, yes? > > Can I have an Acked-By: from Matt and/or Eric? >
Acked-by: Eric Miao <eric.y.miao@gmail.com> --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] [MTD] [NAND] pxa3xx: fix ns2cycle equation
, Axel Lin
, (Mon Aug 16, 1:09 am)
Re: [PATCH] [MTD] [NAND] pxa3xx: fix ns2cycle equation
, David Woodhouse
, (Mon Aug 16, 3:32 am)
Re: [PATCH] [MTD] [NAND] pxa3xx: fix ns2cycle equation
, Eric Miao
, (Mon Aug 16, 5:14 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Rusty Russell
Re: 2.6.22-rc3-mm1
Gautham R Shenoy
[PATCH 1/8] Enhance process freezer interface for usage beyond software suspend
Jeffrey V. Merkey
Re: Versioning file system
James Bottomley
Re: [PATCH -mm 1/2] scsi: remove dma_is_consistent usage in 53c700
David Miller
Re: NO_HZ: timer interrupt stuck
git
:
Oliver Kullmann
Re: how to move with history?
Junio C Hamano
Re: [PATCH 2/3] git-add--interactive: remove hunk coalescing
Miles Bader
Re: way to automatically add untracked files?
Harvey Harrison
Re: [SoC RFC] libsvn-fs-git: A git backend for the subversion filesystem
Alex Riesen
Re: git exclude patterns for directory
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
Linux Kernel Mailing List
OMAP: DSS2: SDI driver
Linux Kernel Mailing List
PCI: introduce pci_pcie_cap()
Linux Kernel Mailing List
netfilter: nf_conntrack_sip: add T.38 FAX support
Linux Kernel Mailing List
drivers/acpi: use kasprintf
linux-netdev
:
Timo Teräs
ip xfrm policy semantics
David Miller
Re: [2.6.30-rc3] powerpc: compilation error of mace module
Patrick McHardy
Re: [rfc 02/13] [RFC 02/13] netfilter: nf_conntrack_sip: Add callid parser
webmaster Maintenance
&#32852;&#31995;&#31995;&#32479;&#31649;&#29702;&#21592;
Krzysztof Oledzki
Re: Error: an inet prefix is expected rather than "0/0".
openbsd-misc
:
Ted Bullock
Re: Proliant DL380 G3 cannot get on network
Úlfar M. E. Johnson
installing openbsd in xen
Eric Furman
Re: Defending OpenBSD Performance
Damien Miller
Re: Patching a SSH 'Weakness'
frantisek holop
Re: mount ffs as msdos, system hangs
Colocation donated by:
Syndicate