[PATCH v2 3/3] mtd: add the new detection method for the unparsable nand chips

2013-01-23 Thread Huang Shijie
Add the new detection method find_nand_type_by_fullid() for the unparsable nand chips. The new detection method is called firstly before all the other detection methods. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c | 33 - 1 files changed, 32

[PATCH v2 2/3] mtd: add a new table for the unparsable nand chips

2013-01-23 Thread Huang Shijie
some singular chips. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_ids.c | 22 ++ include/linux/mtd/nand.h|1 + 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c index 9dc2e54..c1e32d2

[PATCH v2 1/3] mtd: add new fields to nand_flash_dev{}

2013-01-23 Thread Huang Shijie
to the nand_flash_dev{}, and update the detection mechanisms. This patch just adds some new fields to the nand_flash_dev{}. Signed-off-by: Huang Shijie --- drivers/mtd/devices/doc2000.c |2 +- drivers/mtd/devices/doc2001.c |2 +- drivers/mtd/devices/doc2001plus.c |2 +- drivers/mtd

[PATCH v2 0/3] mtd: use the full-id as the keyword.

2013-01-23 Thread Huang Shijie
But we can not parse out the correct oob size for these chips from the id data. So it is time to add some new fields to the nand_flash_dev{}, and update the detection mechanisms. Huang Shijie (3): mtd: add new fields to nand_flash_dev{} mtd: add a new table for the unparsable nand chips mtd: add

[PATCH v2 0/3] mtd: use the full-id as the keyword.

2013-01-23 Thread Huang Shijie
But we can not parse out the correct oob size for these chips from the id data. So it is time to add some new fields to the nand_flash_dev{}, and update the detection mechanisms. Huang Shijie (3): mtd: add new fields to nand_flash_dev{} mtd: add a new table for the unparsable nand chips mtd: add

[PATCH v2 1/3] mtd: add new fields to nand_flash_dev{}

2013-01-23 Thread Huang Shijie
to the nand_flash_dev{}, and update the detection mechanisms. This patch just adds some new fields to the nand_flash_dev{}. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/devices/doc2000.c |2 +- drivers/mtd/devices/doc2001.c |2 +- drivers/mtd/devices/doc2001plus.c

[PATCH v2 2/3] mtd: add a new table for the unparsable nand chips

2013-01-23 Thread Huang Shijie
some singular chips. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_ids.c | 22 ++ include/linux/mtd/nand.h|1 + 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/nand_ids.c index

[PATCH v2 3/3] mtd: add the new detection method for the unparsable nand chips

2013-01-23 Thread Huang Shijie
Add the new detection method find_nand_type_by_fullid() for the unparsable nand chips. The new detection method is called firstly before all the other detection methods. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c | 33 - 1

[PATCH v2] mtd: fix the wrong timeo for panic_nand_wait()

2013-01-21 Thread Huang Shijie
In nand_wait(), the timeo for panic_nand_wait() is assigned with wrong value(jiffies + some delay). The timeo should be set like the panic_nand_write() does. This patch fixes it, and also uses the msecs_to_jiffies() to make the code more readable. Signed-off-by: Huang Shijie --- fix

Re: [PATCH] mtd: fix the wrong timeo for panic_nand_wait()

2013-01-21 Thread Huang Shijie
n panic_nand_write(). thanks Huang Shijie > > Huang Shijie a écrit : >> In nand_wait(), the timeo for panic_nand_wait() is assigned with >> wrong value(jiffies + some delay). >> >> This patch fixes it, and also uses the msecs_to_jiffies() to make the >>

[PATCH] mtd: fix the wrong timeo for panic_nand_wait()

2013-01-21 Thread Huang Shijie
In nand_wait(), the timeo for panic_nand_wait() is assigned with wrong value(jiffies + some delay). This patch fixes it, and also uses the msecs_to_jiffies() to make the code more readable. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |8 ++-- 1 files changed, 2

[PATCH] mtd: fix the wrong timeo for panic_nand_wait()

2013-01-21 Thread Huang Shijie
In nand_wait(), the timeo for panic_nand_wait() is assigned with wrong value(jiffies + some delay). This patch fixes it, and also uses the msecs_to_jiffies() to make the code more readable. Signed-off-by: Huang Shijie shij...@gmail.com --- drivers/mtd/nand/nand_base.c |8 ++-- 1 files

Re: [PATCH] mtd: fix the wrong timeo for panic_nand_wait()

2013-01-21 Thread Huang Shijie
in panic_nand_write(). thanks Huang Shijie Huang Shijie a écrit : In nand_wait(), the timeo for panic_nand_wait() is assigned with wrong value(jiffies + some delay). This patch fixes it, and also uses the msecs_to_jiffies() to make the code more readable. Signed-off-by: Huang Shijie shij

[PATCH v2] mtd: fix the wrong timeo for panic_nand_wait()

2013-01-21 Thread Huang Shijie
In nand_wait(), the timeo for panic_nand_wait() is assigned with wrong value(jiffies + some delay). The timeo should be set like the panic_nand_write() does. This patch fixes it, and also uses the msecs_to_jiffies() to make the code more readable. Signed-off-by: Huang Shijie b32...@freescale.com

Re: [PATCH] mtd: apply tPROG delay for ONFI nand's page program

2013-01-15 Thread Huang Shijie
于 2013年01月14日 20:28, Matthieu CASTET 写道: Huang Shijie a écrit : With some latest Micron's onfi nand(such as MT29F64G08CBABAWP), I find that if we do not apply the tPROG delay as the datasheet tells us, the page program may fails. You will read out the all 0xff from this page in this case

Re: [PATCH] mtd: apply tPROG delay for ONFI nand's page program

2013-01-15 Thread Huang Shijie
于 2013年01月14日 20:28, Matthieu CASTET 写道: Huang Shijie a écrit : With some latest Micron's onfi nand(such as MT29F64G08CBABAWP), I find that if we do not apply the tPROG delay as the datasheet tells us, the page program may fails. You will read out the all 0xff from this page in this case

[PATCH] mtd: gpmi: dump the BCH registers

2013-01-14 Thread Huang Shijie
Dump the BCH registers in gpmi_dump_info(). Signed-off-by: Huang Shijie --- drivers/mtd/nand/gpmi-nand/bch-regs.h |2 ++ drivers/mtd/nand/gpmi-nand/gpmi-lib.c |5 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/bch-regs.h b/drivers/mtd

[PATCH] mtd: apply tPROG delay for ONFI nand's page program

2013-01-14 Thread Huang Shijie
nand. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 8323ac9..b628dd5 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand

[PATCH] mtd: apply tPROG delay for ONFI nand's page program

2013-01-14 Thread Huang Shijie
nand. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 8323ac9..b628dd5 100644 --- a/drivers/mtd/nand/nand_base.c +++ b

[PATCH] mtd: gpmi: dump the BCH registers

2013-01-14 Thread Huang Shijie
Dump the BCH registers in gpmi_dump_info(). Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/gpmi-nand/bch-regs.h |2 ++ drivers/mtd/nand/gpmi-nand/gpmi-lib.c |5 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/gpmi-nand/bch

[PATCH 2/2] serial: mxs-auart: unmap the scatter list before we copy the data

2012-11-22 Thread Huang Shijie
We should first unmap the DMA scatter list for receiving data, and then copy the data from the DMA buffer. The old code misses unmap the scatter list for RX. This patch fixes it. Signed-off-by: Huang Shijie Tested-by: Lauri Hintsala --- drivers/tty/serial/mxs-auart.c |2 ++ 1 files

[PATCH 1/2] serial: mxs-auart: disable the Receive Timeout Interrupt when DMA is enabled

2012-11-22 Thread Huang Shijie
been moved to the DMA buffer by the DMA engine. This patch (1) disables the Receive Timeout Interrupt when the DMA is enabled, (2) and invoke the mxs_auart_rx_chars() only when the DMA is not enabled. Signed-off-by: Huang Shijie Tested-by: Lauri Hintsala --- drivers/tty/serial/mxs-auart.c

[PATCH 1/2] serial: mxs-auart: disable the Receive Timeout Interrupt when DMA is enabled

2012-11-22 Thread Huang Shijie
been moved to the DMA buffer by the DMA engine. This patch (1) disables the Receive Timeout Interrupt when the DMA is enabled, (2) and invoke the mxs_auart_rx_chars() only when the DMA is not enabled. Signed-off-by: Huang Shijie b32...@freescale.com Tested-by: Lauri Hintsala lauri.hints

[PATCH 2/2] serial: mxs-auart: unmap the scatter list before we copy the data

2012-11-22 Thread Huang Shijie
We should first unmap the DMA scatter list for receiving data, and then copy the data from the DMA buffer. The old code misses unmap the scatter list for RX. This patch fixes it. Signed-off-by: Huang Shijie b32...@freescale.com Tested-by: Lauri Hintsala lauri.hints...@bluegiga.com --- drivers

[PATCH 2/2] mtd: remove the "chip" parameter in nand_get_device()

2012-11-18 Thread Huang Shijie
There are two reasons to remove the "chip" parameter in nand_get_device(): [1] The nand_release_device() does not have the "chip" parameter. [2] We can get the nand_chip by the mtd->priv field. This patch removes the "chip" parameter in nand_get_devic

[PATCH 1/2] mtd: remove the de-select chip code in nand_release_device()

2012-11-18 Thread Huang Shijie
the de-select chip code in nand_release_device() which makes the code more clear. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c | 35 +-- 1 files changed, 25 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand

[PATCH 1/2] mtd: remove the de-select chip code in nand_release_device()

2012-11-18 Thread Huang Shijie
the de-select chip code in nand_release_device() which makes the code more clear. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c | 35 +-- 1 files changed, 25 insertions(+), 10 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b

[PATCH 2/2] mtd: remove the chip parameter in nand_get_device()

2012-11-18 Thread Huang Shijie
There are two reasons to remove the chip parameter in nand_get_device(): [1] The nand_release_device() does not have the chip parameter. [2] We can get the nand_chip by the mtd-priv field. This patch removes the chip parameter in nand_get_device(). Signed-off-by: Huang Shijie b32

Re: [PATCH] mtd: gpmi: remove unneccessary header

2012-11-09 Thread Huang Shijie
On Fri, Nov 9, 2012 at 10:10 AM, Artem Bityutskiy wrote: > On Sat, 2012-10-27 at 10:23 +0800, Huang Shijie wrote: >> 于 2012年10月26日 21:41, Artem Bityutskiy 写道: >> > On Sat, 2012-10-13 at 13:03 -0400, Huang Shijie wrote: >> > > The whole gpmi-nand driver has turne

[PATCH] mtd: de-select the chip when it is not used

2012-11-09 Thread Huang Shijie
. To make the logic clear, we'd better de-select the chip when it is not used. This patch de-select the nand chip if it is not used any more. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/mtd

[PATCH] mtd: de-select the chip when it is not used

2012-11-09 Thread Huang Shijie
. To make the logic clear, we'd better de-select the chip when it is not used. This patch de-select the nand chip if it is not used any more. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff

Re: [PATCH] mtd: gpmi: remove unneccessary header

2012-11-09 Thread Huang Shijie
On Fri, Nov 9, 2012 at 10:10 AM, Artem Bityutskiy dedeki...@gmail.com wrote: On Sat, 2012-10-27 at 10:23 +0800, Huang Shijie wrote: 于 2012年10月26日 21:41, Artem Bityutskiy 写道: On Sat, 2012-10-13 at 13:03 -0400, Huang Shijie wrote: The whole gpmi-nand driver has turned to pure devicetree

[PATCH] mtd: cmdlinepart: fix the overflow of big mtd partitions

2012-11-01 Thread Huang Shijie
verflow occurs, the "size" becomes zero in the end. This patch changes the "size"/"offset" to "unsigned long long" type, and replaces the UINT_MAX with ULLONG_MAX for macros SIZE_REMAINING and OFFSET_CONTINUOUS. Signed-off-by: Huang Shijie --- drivers/m

[PATCH] mtd: cmdlinepart: fix the overflow of big mtd partitions

2012-11-01 Thread Huang Shijie
changes the size/offset to unsigned long long type, and replaces the UINT_MAX with ULLONG_MAX for macros SIZE_REMAINING and OFFSET_CONTINUOUS. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/cmdlinepart.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff

Re: [PATCH] mtd: use the NAND_STATUS_FAIL to replace the hardcode

2012-10-24 Thread Huang Shijie
ping On Mon, Oct 15, 2012 at 11:47 AM, Huang Shijie wrote: > Use the NAND_STATUS_FAIL to replace the hardcode "0x01", > which make the code more readable. > > Signed-off-by: Huang Shijie > --- > drivers/mtd/nand/nand_base.c |4 ++-- > 1 files change

Re: [PATCH] mtd: gpmi: remove unneccessary header

2012-10-24 Thread Huang Shijie
ping. On Sun, Oct 14, 2012 at 1:03 AM, Huang Shijie wrote: > The whole gpmi-nand driver has turned to pure devicetree supported. > So the linux/mtd/gpmi-nand.h is not neccessary now. Just remove it, > and move some macros to the gpmi-nand driver itself. > > Signed-off-b

Re: [PATCH] mtd: gpmi: remove unneccessary header

2012-10-24 Thread Huang Shijie
ping. On Sun, Oct 14, 2012 at 1:03 AM, Huang Shijie shij...@gmail.com wrote: The whole gpmi-nand driver has turned to pure devicetree supported. So the linux/mtd/gpmi-nand.h is not neccessary now. Just remove it, and move some macros to the gpmi-nand driver itself. Signed-off-by: Huang

Re: [PATCH] mtd: use the NAND_STATUS_FAIL to replace the hardcode

2012-10-24 Thread Huang Shijie
ping On Mon, Oct 15, 2012 at 11:47 AM, Huang Shijie shij...@gmail.com wrote: Use the NAND_STATUS_FAIL to replace the hardcode 0x01, which make the code more readable. Signed-off-by: Huang Shijie shij...@gmail.com --- drivers/mtd/nand/nand_base.c |4 ++-- 1 files changed, 2 insertions

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
On Thu, Oct 18, 2012 at 5:29 AM, Jassi Brar wrote: > On 18 October 2012 12:15, Huang Shijie wrote: >> 于 2012年10月18日 14:18, Vinod Koul 写道: >> >>> Why cant you do start (prepare clock etc) when you submit the descriptor >>> to dmaengine. Can be done in tx_subm

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
On Thu, Oct 18, 2012 at 6:51 AM, Marek Vasut wrote: > Dear Huang Shijie, > >> 于 2012年10月18日 16:49, Marek Vasut 写道: >> > Dear Huang Shijie, >> > >> >> 于 2012年10月18日 16:16, Marek Vasut 写道: >> >>> So we can't stream data from the chi

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
于 2012年10月18日 16:49, Marek Vasut 写道: Dear Huang Shijie, 于 2012年10月18日 16:16, Marek Vasut 写道: So we can't stream data from the chip? About time to adjust the MTD framework to allow that. Maybe implement a command queue? IMHO, it's not possible. Because the READ-PAGE(00h-30h) command needs

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
于 2012年10月18日 16:52, Russell King - ARM Linux 写道: On Thu, Oct 18, 2012 at 02:45:41PM +0800, Huang Shijie wrote: 于 2012年10月18日 14:18, Vinod Koul 写道: Why cant you do start (prepare clock etc) when you submit the descriptor to dmaengine. Can be done in tx_submit callback. Similarly remove

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
in the middle, so we can not chain the all the read-pages DMA commands. thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html P

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
于 2012年10月18日 16:16, Marek Vasut 写道: So we can't stream data from the chip? About time to adjust the MTD framework to allow that. Maybe implement a command queue? to Artem & David: is this possible to stream the data out with a command queue? thanks Huang Shijie -- To unsubscribe

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
于 2012年10月18日 15:14, Marek Vasut 写道: Dear Huang Shijie, Why such massive CC ? 于 2012年10月18日 14:18, Vinod Koul 写道: Why cant you do start (prepare clock etc) when you submit the descriptor to dmaengine. Can be done in tx_submit callback. Similarly remove the clock when dma transaction gets

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
, the system has to enable the clock chain and it's parents ... But with this patch, we only need to enable/disable dma clock one time, just at we select the nand chip. thanks Huang Shijie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

[PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
From: Huang Shijie [1] Why add these new DMA control commands? In mx6q, the gpmi-nand driver is the only user of the APBH-DMA. The dma clock is enabled when we have successfully requested a DMA channel. So even when the gpmi-nand driver does not work, the dma clock(apbh-dma) still

[PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
From: Huang Shijie shij...@gmail.com [1] Why add these new DMA control commands? In mx6q, the gpmi-nand driver is the only user of the APBH-DMA. The dma clock is enabled when we have successfully requested a DMA channel. So even when the gpmi-nand driver does not work, the dma clock

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
, the system has to enable the clock chain and it's parents ... But with this patch, we only need to enable/disable dma clock one time, just at we select the nand chip. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
于 2012年10月18日 15:14, Marek Vasut 写道: Dear Huang Shijie, Why such massive CC ? 于 2012年10月18日 14:18, Vinod Koul 写道: Why cant you do start (prepare clock etc) when you submit the descriptor to dmaengine. Can be done in tx_submit callback. Similarly remove the clock when dma transaction gets

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
于 2012年10月18日 16:16, Marek Vasut 写道: So we can't stream data from the chip? About time to adjust the MTD framework to allow that. Maybe implement a command queue? to Artem David: is this possible to stream the data out with a command queue? thanks Huang Shijie -- To unsubscribe from

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
in the middle, so we can not chain the all the read-pages DMA commands. thanks Huang Shijie -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
于 2012年10月18日 16:52, Russell King - ARM Linux 写道: On Thu, Oct 18, 2012 at 02:45:41PM +0800, Huang Shijie wrote: 于 2012年10月18日 14:18, Vinod Koul 写道: Why cant you do start (prepare clock etc) when you submit the descriptor to dmaengine. Can be done in tx_submit callback. Similarly remove

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
于 2012年10月18日 16:49, Marek Vasut 写道: Dear Huang Shijie, 于 2012年10月18日 16:16, Marek Vasut 写道: So we can't stream data from the chip? About time to adjust the MTD framework to allow that. Maybe implement a command queue? IMHO, it's not possible. Because the READ-PAGE(00h-30h) command needs

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
On Thu, Oct 18, 2012 at 6:51 AM, Marek Vasut ma...@denx.de wrote: Dear Huang Shijie, 于 2012年10月18日 16:49, Marek Vasut 写道: Dear Huang Shijie, 于 2012年10月18日 16:16, Marek Vasut 写道: So we can't stream data from the chip? About time to adjust the MTD framework to allow that. Maybe

Re: [PATCH] dma: add new DMA control commands

2012-10-18 Thread Huang Shijie
On Thu, Oct 18, 2012 at 5:29 AM, Jassi Brar jaswinder.si...@linaro.org wrote: On 18 October 2012 12:15, Huang Shijie b32...@freescale.com wrote: 于 2012年10月18日 14:18, Vinod Koul 写道: Why cant you do start (prepare clock etc) when you submit the descriptor to dmaengine. Can be done in tx_submit

[PATCH] mtd: use the NAND_STATUS_FAIL to replace the hardcode

2012-10-14 Thread Huang Shijie
Use the NAND_STATUS_FAIL to replace the hardcode "0x01", which make the code more readable. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_ba

[PATCH] mtd: use the NAND_STATUS_FAIL to replace the hardcode

2012-10-14 Thread Huang Shijie
Use the NAND_STATUS_FAIL to replace the hardcode 0x01, which make the code more readable. Signed-off-by: Huang Shijie shij...@gmail.com --- drivers/mtd/nand/nand_base.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand

[PATCH] mtd: gpmi: remove unneccessary header

2012-10-12 Thread Huang Shijie
The whole gpmi-nand driver has turned to pure devicetree supported. So the linux/mtd/gpmi-nand.h is not neccessary now. Just remove it, and move some macros to the gpmi-nand driver itself. Signed-off-by: Huang Shijie --- drivers/mtd/nand/gpmi-nand/gpmi-lib.c |1 - drivers/mtd/nand/gpmi

[PATCH] mtd: gpmi: remove unneccessary header

2012-10-12 Thread Huang Shijie
The whole gpmi-nand driver has turned to pure devicetree supported. So the linux/mtd/gpmi-nand.h is not neccessary now. Just remove it, and move some macros to the gpmi-nand driver itself. Signed-off-by: Huang Shijie shij...@gmail.com --- drivers/mtd/nand/gpmi-nand/gpmi-lib.c |1 - drivers

[PATCH 1/2] mtd: add helpers to set/get features for ONFI nand

2012-09-10 Thread Huang Shijie
Add the set-features(0xef)/get-features(0xee) helpers for ONFI nand. Also add the necessary macros. Signed-off-by: Huang Shijie --- drivers/mtd/nand/nand_base.c | 50 ++ include/linux/mtd/nand.h | 14 +++ 2 files changed, 64 insertions

[PATCH 2/2] mtd: add helpers to get the supportted ONFI timing mode

2012-09-10 Thread Huang Shijie
add onfi_get_async_timing_mode() to get the supportted asynchronous timing mode. add onfi_get_sync_timing_mode() to get the supportted synchronous timing mode. Also add the neccessary macros : the timing modes. Signed-off-by: Huang Shijie --- include/linux/mtd/nand.h | 20

[PATCH 2/2] mtd: add helpers to get the supportted ONFI timing mode

2012-09-10 Thread Huang Shijie
add onfi_get_async_timing_mode() to get the supportted asynchronous timing mode. add onfi_get_sync_timing_mode() to get the supportted synchronous timing mode. Also add the neccessary macros : the timing modes. Signed-off-by: Huang Shijie b32...@freescale.com --- include/linux/mtd/nand.h

[PATCH 1/2] mtd: add helpers to set/get features for ONFI nand

2012-09-10 Thread Huang Shijie
Add the set-features(0xef)/get-features(0xee) helpers for ONFI nand. Also add the necessary macros. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/mtd/nand/nand_base.c | 50 ++ include/linux/mtd/nand.h | 14 +++ 2 files

[PATCH] serial: mxs-auart: put the device when exit or error

2012-09-06 Thread Huang Shijie
We call the get_device() in the mxs_auart_probe(). For the balance of the reference count, we should put the device in the mxs_auart_remove() or in the error path of probe. Signed-off-by: Huang Shijie --- drivers/tty/serial/mxs-auart.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions

Re: [PATCH 2/2] serial: mxs-auart: put the device in mxs_auart_probe()

2012-09-06 Thread Huang Shijie
于 2012年09月07日 10:43, Shawn Guo 写道: On Thu, Sep 06, 2012 at 10:38:41PM -0400, Huang Shijie wrote: We call the get_device() in the mxs_auart_probe(). For the balance of the reference count, we should put the device in the mxs_auart_remove(). Signed-off-by: Huang Shijie --- drivers/tty/serial

Re: [PATCH 1/2] serial: mxs-auart: fix the wrong setting order

2012-09-06 Thread Huang Shijie
于 2012年09月07日 10:38, Shawn Guo 写道: On Thu, Sep 06, 2012 at 10:38:40PM -0400, Huang Shijie wrote: After set the AUART_CTRL0_CLKGATE, the UART will gate all the clocks off. So the following line will not take effect

[PATCH 2/2] serial: mxs-auart: put the device in mxs_auart_probe()

2012-09-06 Thread Huang Shijie
We call the get_device() in the mxs_auart_probe(). For the balance of the reference count, we should put the device in the mxs_auart_remove(). Signed-off-by: Huang Shijie --- drivers/tty/serial/mxs-auart.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/tty

[PATCH 1/2] serial: mxs-auart: fix the wrong setting order

2012-09-06 Thread Huang Shijie
ase + AUART_INTR_CLR); To fix this issue, the patch moves this gate-off line to the end of setting registers. Signed-off-by: Huang Shijie --- drivers/tty/serial/mxs-auart.c |4 ++-- 1 files changed, 2 insertions(+)

[PATCH 1/2] serial: mxs-auart: fix the wrong setting order

2012-09-06 Thread Huang Shijie
+ AUART_INTR_CLR); To fix this issue, the patch moves this gate-off line to the end of setting registers. Signed-off-by: Huang Shijie shij...@gmail.com --- drivers/tty/serial/mxs-auart.c |4 ++-- 1 files changed, 2

[PATCH 2/2] serial: mxs-auart: put the device in mxs_auart_probe()

2012-09-06 Thread Huang Shijie
We call the get_device() in the mxs_auart_probe(). For the balance of the reference count, we should put the device in the mxs_auart_remove(). Signed-off-by: Huang Shijie shij...@gmail.com --- drivers/tty/serial/mxs-auart.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

Re: [PATCH 1/2] serial: mxs-auart: fix the wrong setting order

2012-09-06 Thread Huang Shijie
于 2012年09月07日 10:38, Shawn Guo 写道: On Thu, Sep 06, 2012 at 10:38:40PM -0400, Huang Shijie wrote: After set the AUART_CTRL0_CLKGATE, the UART will gate all the clocks off. So the following line will not take effect

Re: [PATCH 2/2] serial: mxs-auart: put the device in mxs_auart_probe()

2012-09-06 Thread Huang Shijie
于 2012年09月07日 10:43, Shawn Guo 写道: On Thu, Sep 06, 2012 at 10:38:41PM -0400, Huang Shijie wrote: We call the get_device() in the mxs_auart_probe(). For the balance of the reference count, we should put the device in the mxs_auart_remove(). Signed-off-by: Huang Shijieshij...@gmail.com

[PATCH] serial: mxs-auart: put the device when exit or error

2012-09-06 Thread Huang Shijie
We call the get_device() in the mxs_auart_probe(). For the balance of the reference count, we should put the device in the mxs_auart_remove() or in the error path of probe. Signed-off-by: Huang Shijie b32...@freescale.com --- drivers/tty/serial/mxs-auart.c |2 ++ 1 files changed, 2

Re: [PATCH 1/3] mtd: cmdlinepart: make the partitions rule more strict

2012-09-03 Thread Huang Shijie
On Mon, Sep 3, 2012 at 3:18 AM, Artem Bityutskiy wrote: > On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: >> + * >> + * Note: >> + * If you choose to set the @offset for the , please set all >> + * the partitions with the same syntax, such as: >> + *

Re: [PATCH 1/3] mtd: cmdlinepart: make the partitions rule more strict

2012-09-03 Thread Huang Shijie
On Mon, Sep 3, 2012 at 3:18 AM, Artem Bityutskiy dedeki...@gmail.com wrote: On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: + * + * Note: + * If you choose to set the @offset for the partdef, please set all + * the partitions with the same syntax, such as: + * gpmi-nand:100m@0

Re: [PATCH 1/3] mtd: cmdlinepart: make the partitions rule more strict

2012-08-31 Thread Huang Shijie
On Fri, Aug 31, 2012 at 7:45 AM, Artem Bityutskiy wrote: > On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: >> There are typically two types to set the mtd partitions: >> >> <1> set with the `size`, such as >> gpmi-nand:100m(boot),100m(kernel),1g(rootf

Re: [PATCH 2/3] mtd: cmdlinepart: sort the unsorted partitions

2012-08-31 Thread Huang Shijie
On Fri, Aug 31, 2012 at 9:59 AM, Artem Bityutskiy wrote: > On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: >> Assume we have a 1GB(8Gb) nand chip. >> It is legit if we set the partitions as the following: >> gpmi-nand:1g@200m(rootfs),100m@0(boot),100m@100m(kernel)

Re: [PATCH 1/3] mtd: cmdlinepart: make the partitions rule more strict

2012-08-31 Thread Huang Shijie
On Fri, Aug 31, 2012 at 7:45 AM, Artem Bityutskiy wrote: > On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: >> There are typically two types to set the mtd partitions: >> >> <1> set with the `size`, such as >> gpmi-nand:100m(boot),100m(kernel),1g(rootf

Re: [PATCH 1/3] mtd: cmdlinepart: make the partitions rule more strict

2012-08-31 Thread Huang Shijie
On Fri, Aug 31, 2012 at 7:45 AM, Artem Bityutskiy dedeki...@gmail.com wrote: On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: There are typically two types to set the mtd partitions: 1 set with the `size`, such as gpmi-nand:100m(boot),100m(kernel),1g(rootfs) 2 set with the `offset

Re: [PATCH 2/3] mtd: cmdlinepart: sort the unsorted partitions

2012-08-31 Thread Huang Shijie
On Fri, Aug 31, 2012 at 9:59 AM, Artem Bityutskiy dedeki...@gmail.com wrote: On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: Assume we have a 1GB(8Gb) nand chip. It is legit if we set the partitions as the following: gpmi-nand:1g@200m(rootfs),100m@0(boot),100m@100m(kernel

Re: [PATCH 1/3] mtd: cmdlinepart: make the partitions rule more strict

2012-08-31 Thread Huang Shijie
On Fri, Aug 31, 2012 at 7:45 AM, Artem Bityutskiy dedeki...@gmail.com wrote: On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: There are typically two types to set the mtd partitions: 1 set with the `size`, such as gpmi-nand:100m(boot),100m(kernel),1g(rootfs) 2 set with the `offset

Re: [PATCH 3/3] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-30 Thread Huang Shijie
On Thu, Aug 30, 2012 at 2:43 PM, Artem Bityutskiy wrote: > On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: >> This patch is based on the assumption that all the partitions are >> in the right offset order. >> >> Assume we have a 1GB(8Gb) nand chip

Re: [PATCH 3/3] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-30 Thread Huang Shijie
On Thu, Aug 30, 2012 at 2:43 PM, Artem Bityutskiy dedeki...@gmail.com wrote: On Sun, 2012-08-26 at 13:21 -0400, Huang Shijie wrote: This patch is based on the assumption that all the partitions are in the right offset order. Assume we have a 1GB(8Gb) nand chip, and we set the partitions

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-29 Thread Huang Shijie
于 2012年08月29日 16:24, Artem Bityutskiy 写道: While appreciating Shmulik's attention to details, I vote this way: On Sun, 2012-08-26 at 02:47 -0400, Huang Shijie wrote: Could Artem or David point us a direction about this? [1] Should the unsorted partitions be supported? No, it is asking

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-29 Thread Huang Shijie
于 2012年08月29日 16:24, Artem Bityutskiy 写道: While appreciating Shmulik's attention to details, I vote this way: On Sun, 2012-08-26 at 02:47 -0400, Huang Shijie wrote: Could Artem or David point us a direction about this? [1] Should the unsorted partitions be supported? No, it is asking

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong check condition

2012-08-26 Thread Huang Shijie
On Sat, Aug 25, 2012 at 5:31 AM, Shmulik Ladkani wrote: > Hi Huang, Artem, > > On Sat, 25 Aug 2012 16:06:50 -0400 Huang Shijie wrote: >> diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c >> index fc960a3..216d751 100644 >> --- a/drivers/mtd/cmdline

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-26 Thread Huang Shijie
On Sun, Aug 26, 2012 at 2:06 AM, Shmulik Ladkani wrote: > Hi, > > On Sat, 25 Aug 2012 05:26:51 -0400 Huang Shijie wrote: >> On Sat, Aug 25, 2012 at 5:02 AM, Shmulik Ladkani >> wrote: >> > Your analysis seems right, but let me offer an alternative appr

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-26 Thread Huang Shijie
On Sun, Aug 26, 2012 at 2:06 AM, Shmulik Ladkani shmulik.ladk...@gmail.com wrote: Hi, On Sat, 25 Aug 2012 05:26:51 -0400 Huang Shijie shij...@gmail.com wrote: On Sat, Aug 25, 2012 at 5:02 AM, Shmulik Ladkani shmulik.ladk...@gmail.com wrote: Your analysis seems right, but let me offer

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong check condition

2012-08-26 Thread Huang Shijie
On Sat, Aug 25, 2012 at 5:31 AM, Shmulik Ladkani shmulik.ladk...@gmail.com wrote: Hi Huang, Artem, On Sat, 25 Aug 2012 16:06:50 -0400 Huang Shijie shij...@gmail.com wrote: diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index fc960a3..216d751 100644 --- a/drivers/mtd

[PATCH 2/3] mtd: cmdlinepart: sort the unsorted partitions

2012-08-25 Thread Huang Shijie
. For there are maybe only several partitions, i use the simple Bubble sort algorithm. Signed-off-by: Huang Shijie --- drivers/mtd/cmdlinepart.c | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index

[PATCH 3/3] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-25 Thread Huang Shijie
, the result becomes: -- root@freescale ~$ cat /proc/mtd dev:size erasesize name mtd0: 0640 0004 "boot" mtd1: 0640 0004 "kernel" mtd2: 3380 0004 "rootfs" ----

[PATCH 1/3] mtd: cmdlinepart: make the partitions rule more strict

2012-08-25 Thread Huang Shijie
ype. Signed-off-by: Huang Shijie --- drivers/mtd/cmdlinepart.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index fe7e3a5..0b7b2ad 100644 --- a/drivers/mtd/cmdlinepart.c +++ b/drivers/mtd/cmdlinepart.c @@

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-25 Thread Huang Shijie
On Sat, Aug 25, 2012 at 5:42 AM, Shmulik Ladkani wrote: > On Sat, 25 Aug 2012 05:26:51 -0400 Huang Shijie wrote: >> > The specified cmdline partitions might not be ordered (according to >> > start offset), so next partition specified after the truncated one might &g

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-25 Thread Huang Shijie
On Sat, Aug 25, 2012 at 5:02 AM, Shmulik Ladkani wrote: > Hi Huang, > > On Sat, 25 Aug 2012 10:26:07 -0400 Huang Shijie wrote: >> diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c >> index 4558e0f..fc960a3 100644 >> --- a/drivers/mtd/cmdline

[PATCH v2] mtd: cmdlinepart: fix the wrong check condition

2012-08-25 Thread Huang Shijie
parses out several mtd partitions right now. This is obviously wrong. We even do not enable the gpmi-nand in this case. The patch comes from Artem's suggestion code which is better then mine. Signed-off-by: Huang Shijie --- drivers/mtd/cmdlinepart.c |5 - 1 files changed, 4 insertions

[PATCH v2] mtd: cmdlinepart: fix the wrong check condition

2012-08-25 Thread Huang Shijie
parses out several mtd partitions right now. This is obviously wrong. We even do not enable the gpmi-nand in this case. The patch comes from Artem's suggestion code which is better then mine. Signed-off-by: Huang Shijie shij...@gmail.com --- drivers/mtd/cmdlinepart.c |5 - 1 files

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-25 Thread Huang Shijie
On Sat, Aug 25, 2012 at 5:02 AM, Shmulik Ladkani shmulik.ladk...@gmail.com wrote: Hi Huang, On Sat, 25 Aug 2012 10:26:07 -0400 Huang Shijie shij...@gmail.com wrote: diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index 4558e0f..fc960a3 100644 --- a/drivers/mtd

Re: [PATCH v2] mtd: cmdlinepart: fix the wrong partitions number when truncating occurs

2012-08-25 Thread Huang Shijie
On Sat, Aug 25, 2012 at 5:42 AM, Shmulik Ladkani shmulik.ladk...@gmail.com wrote: On Sat, 25 Aug 2012 05:26:51 -0400 Huang Shijie shij...@gmail.com wrote: The specified cmdline partitions might not be ordered (according to start offset), so next partition specified after the truncated one

[PATCH 1/3] mtd: cmdlinepart: make the partitions rule more strict

2012-08-25 Thread Huang Shijie
-by: Huang Shijie shij...@gmail.com --- drivers/mtd/cmdlinepart.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c index fe7e3a5..0b7b2ad 100644 --- a/drivers/mtd/cmdlinepart.c +++ b/drivers/mtd/cmdlinepart.c

<    3   4   5   6   7   8   9   >