On Fri, Jun 20, 2014 at 05:35:22PM +0800, Vincent Yang wrote:
> This patch defines a quirk for platforms unable
> to enable 3.0V support.
> It is a preparation and will be used by Fujitsu
> SDHCI controller f_sdh30 driver.
>
> Signed-off-by: Vincent Yang
I don't think you need this patch. Instea
ned-off-by: Haijun Zhang
> ---
Reviewed-by: Anton Vorontsov
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
et from host capacity register.
>
> Signed-off-by: Haijun Zhang
Acked-by: Anton Vorontsov
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
On Mon, Aug 12, 2013 at 09:39:05AM +0800, Haijun Zhang wrote:
> Using function mmc_of_parse_voltage() to get voltage-ranges.
>
> Signed-off-by: Haijun Zhang
> ---
Acked-by: Anton Vorontsov
___
Linuxppc-dev mailing list
Linuxppc-dev@list
On Wed, Aug 14, 2013 at 01:46:11PM +0800, Haijun Zhang wrote:
> Add function to support get voltage from device-tree.
> If there are voltage-range specified in device-tree node, this function
> will parse it and return the available voltage mask.
>
> Signed-off-by: Haijun Zhang
On Wed, Jul 31, 2013 at 02:25:25PM +0800, Haijun Zhang wrote:
> Add function to support get voltage from device-tree.
> If there are voltage-range specified in device-tree node, this function
> will parse it and return the avail voltage mask.
>
> Signed-off-by: Haijun Zhang
> ---
> changes for v2
s unspecified\n");
> + ocr_mask = mmc_of_parse_voltage(np);
> + if (ocr_mask <= 0)
'< 0' check for an unsigned type? :) I'd write just !ocr_mask...
But other than that the patch looks good to me...
Reviewed-by: Anton Vorontsov
Thanks!
>
lse we still read
> from capacity or from other provider.
>
> Signed-off-by: Haijun Zhang
> Signed-off-by: Anton Vorontsov
Development process nitpick...
The code originated from me, but I did not sign off this patch...
Per Documentation/SubmittingPatches:
The Signed-off-by: tag i
On Mon, Jul 22, 2013 at 09:41:34PM -0500, Scott Wood wrote:
[...]
> >> > +static void esdhc_get_voltage(struct sdhci_host *host,
> >> > +struct platform_device *pdev)
> >> > +{
> >> > +}
> >>
> >> Don't duplicate this code. Move it somewhere common and share it.
> >[Ha
knows better, otherwise read capabilities
from the register.
Anton
> Thanks.
>
> Regards
> Haijun.
>
>
> > -Original Message-
> > From: linux-mmc-ow...@vger.kernel.org [mailto:linux-mmc-
> > ow...@vger.kernel.org] On Behalf Of Anton Vorontsov
> &
On Mon, Jul 08, 2013 at 12:18:39PM -0500, Scott Wood wrote:
> On 07/08/2013 02:16:04 AM, Haijun Zhang wrote:
> >On T4240QDS board controllers has an unusable ADMA engine, so use
> >SDMA instead.
> >Also 3.0v is support on T4240QDS board even if the capacity
> >detailed only 1.8v
> >support. Without
Hi!
On Tue, May 14, 2013 at 08:59:13AM +, Wang Dongsheng-B40534 wrote:
> I send to a wrong email address "Anton Vorontsov "
>
> Add Anton Vorontsov to this email.
I don't have any means to test it, but the patch itself looks good and the
description makes sense.
Hello Huang,
On Fri, Oct 26, 2012 at 02:42:36AM +, Huang Changming-R66093 wrote:
> For the current polling mode, driver will send CMD13 to poll the card status
> periodically , which will cause too many interrupts.
> Once I sent patches to detect the card when using polling mode last year:
>
e boards, but left others to suffer. Ideally, the
best fix would be to also make the card polling cheap.
Anyways, using (d) clause of the "Reviewer's statement of oversight", I
can easily give this:
Reviewed-by: Anton Vorontsov
:)
Thanks!
[...]
> > > IIRC, the
e the default card detect to interrupt mode,
> if the board can't support this mode, we still use the poll mode.
>
> Signed-off-by: Jerry Huang
> CC: Anton Vorontsov
> CC: Chris Ball
> ---
IIRC, the card detection is broken SOC-revision-wise, not board-wise. So
the chang
On Wed, Sep 12, 2012 at 03:19:18AM +, Huang Changming-R66093 wrote:
[...]
> I don't think it is the best way to do it. For the VVN2.2 or older,
> some silicon support this feature (mpc8536 and p2020), but other
> silicones don't support it (e.g. p4080, p102x). Though, the current
> p5/p4/p3 h
On Tue, Sep 11, 2012 at 12:54:29AM -0700, Anton Vorontsov wrote:
> On Tue, Sep 11, 2012 at 03:12:44PM +0800, chang-ming.hu...@freescale.com
> wrote:
> > From: Jerry Huang
> >
> > Below SOCs don't support the cmd23 command for MMC card,
> > therefore, disable
This patch adds more comments on clear_tasks_mm_cpumask, plus adds
a runtime check: the function is only suitable for offlined CPUs,
and if called inappropriately, the kernel should scream aloud.
Suggested-by: Andrew Morton
Suggested-by: Peter Zijlstra
Signed-off-by: Anton Vorontsov
---
On
cpumask_clear_cpu(cpu, mm_cpumask(t->mm));
> > + task_unlock(t);
> > + }
> > + rcu_read_unlock();
> > +}
>
> It is good that this code exists under CONFIG_HOTPLUG_CPU. Did you
> check that everything works correctly with CONFIG_HOTPLUG_CPU=n?
Yeah,
On Mon, Apr 23, 2012 at 04:57:54PM +0200, Richard Weinberger wrote:
> On 23.04.2012 09:09, Anton Vorontsov wrote:
> >Traversing the tasks requires holding tasklist_lock, otherwise it
> >is unsafe.
> >
> >p.s. However, I'm not sure that calling os_kill_ptraced_proce
turns an appropriate task (with task lock held).
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/um/kernel/reboot.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c
index 1411f4e..3d15243 1006
should also use find_lock_task_mm() to check all process'
threads for a valid mm, but for uml we'll do it in a separate patch.
Signed-off-by: Anton Vorontsov
---
arch/um/kernel/reboot.c |7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/um/kernel/reboot.c b/arc
Traversing the tasks requires holding tasklist_lock, otherwise it
is unsafe.
p.s. However, I'm not sure that calling os_kill_ptraced_process()
in the atomic context is correct. It seem to work, but please
take a closer look.
Signed-off-by: Anton Vorontsov
---
arch/um/kernel/reboot.c |
ite_ variant of the
tasklist lock, read_ one is enough.
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/blackfin/kernel/trace.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/blackfin/kernel/trace.c b/arch/blackfin/kernel/trace.c
index d08f
eads and returns an appropriate task (with task lock held).
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/blackfin/kernel/trace.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/arch/blackfin/kernel/trace.c b/arch/blackfin/k
ock held).
clear_tasks_mm_cpumask() has the issue fixed, so let's use it.
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/sh/kernel/smp.c |7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index eaebdf6..4
_lock_task_mm(), which would
walk up all threads and returns an appropriate task (with task
lock held).
clear_tasks_mm_cpumask() has all the issues fixed, so let's use it.
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/powerpc/mm/mmu_context_nohash.c | 11 ++-
ock held).
clear_tasks_mm_cpumask() has this issue fixed, so let's use it.
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/arm/kernel/smp.c |8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index add
he rcu read lock. We can do this
because the function is called after the cpu is taken down and marked
offline, so no new tasks will get this cpu set in their mm mask.
Signed-off-by: Anton Vorontsov
---
include/linux/cpu.h |1 +
kernel/cpu.c| 26 ++
2 files
ly
the rcu read lock, no need for the whole tasklist_lock.
Suggested by Peter Zijlstra.
In v2:
- introduced a small helper in cpu.c: most arches duplicate the
same [buggy] code snippet, so it's better to fix it and move the
logic into a common function.
Thanks,
--
Anton Vor
On Sat, Mar 24, 2012 at 01:48:23PM +0100, Peter Zijlstra wrote:
> On Sat, 2012-03-24 at 14:30 +0400, Anton Vorontsov wrote:
> > Traversing the tasks requires holding tasklist_lock, otherwise it
> > is unsafe.
>
> No it doesn't, it either requires tasklist_lock
this
because the function is called after the cpu is taken down and marked
offline, so no new tasks will get this cpu set in their mm mask.
Signed-off-by: Anton Vorontsov
---
On Sat, Mar 24, 2012 at 01:43:41PM +0100, Peter Zijlstra wrote:
> On Sat, 2012-03-24 at 14:27 +0400, Anton
d_locked(l, __ret_value);
extern struct task_struct *find_lock_task_mm(struct task_struct *p)
__ret_locked_nonnull(&__ret_value->alloc_lock);
Thanks,
--
Anton Vorontsov
Email: cbouatmai...@gmail.com
___
Linuxppc-dev mailing list
Linu
e in
'task_in_mem_cgroup' - unexpected unlock
p.s. I know Peter Zijlstra detest the __cond_lock() stuff, but untill
we have anything better in sparse, let's use it. This particular
patch helped me to detect one bug that I myself made during
task->mm fixup series. S
turns an appropriate task (with task lock held).
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/um/kernel/reboot.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c
index 1411f4e..3d15243 1006
should also use find_lock_task_mm() to check all process'
threads for a valid mm, but for uml we'll do it in a separate patch.
Signed-off-by: Anton Vorontsov
---
arch/um/kernel/reboot.c |7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/um/kernel/reboot.c b/arc
Traversing the tasks requires holding tasklist_lock, otherwise it
is unsafe.
p.s. However, I'm not sure that calling os_kill_ptraced_process()
in the atomic context is correct. It seem to work, but please
take a closer look.
Signed-off-by: Anton Vorontsov
---
arch/um/kernel/reboot.c |
ite_ variant of the
tasklist lock, read_ one is enough.
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/blackfin/kernel/trace.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/blackfin/kernel/trace.c b/arch/blackfin/kernel/trace.c
index 5102
eads and returns an appropriate task (with task lock held).
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/blackfin/kernel/trace.c | 26 +-
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/arch/blackfin/kernel/trace.c b/arch/blackfin/k
_lock_task_mm(), which would
walk up all threads and returns an appropriate task (with task
lock held).
clear_tasks_mm_cpumask() has all the issues fixed, so let's use it.
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/sh/kernel/smp.c |7 +--
1 file changed,
_lock_task_mm(), which would
walk up all threads and returns an appropriate task (with task
lock held).
clear_tasks_mm_cpumask() has all the issues fixed, so let's use it.
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/powerpc/mm/mmu_context_nohash.c | 11 ++-
_lock_task_mm(), which would
walk up all threads and returns an appropriate task (with task
lock held).
clear_tasks_mm_cpumask() has all the issues fixed, so let's use it.
Suggested-by: Oleg Nesterov
Signed-off-by: Anton Vorontsov
---
arch/arm/kernel/smp.c |8 +---
1 file
);
2. To catch exited main thread case, we use find_lock_task_mm(),
which walks up all threads and returns an appropriate task
(with task lock held).
Signed-off-by: Anton Vorontsov
---
include/linux/cpu.h |1 +
kernel/cpu.c| 18 ++
2 files changed, 19 insert
o it's better to fix it
and move the logic into a common function.
Thanks!
--
Anton Vorontsov
Email: cbouatmai...@gmail.com
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
; Signed-off-by: Kumar Gala
> ---
The patch looks OK.
Acked-by: Anton Vorontsov
[...]
> +static u8 esdhc_readb(struct sdhci_host *host, int reg)
> +{
> + int base = reg & ~0x3;
> + int shift = (reg & 0x3) * 8;
> + u8 ret = (in_be32(host->ioaddr + base) >
On Tue, Aug 23, 2011 at 02:38:41PM +0200, Joakim Tjernlund wrote:
> MPC832x does not have enough MURAM to do fixed MURAM allocation.
> Change to dynamic allocation.
>
> Signed-off-by: Joakim Tjernlund
Acked-by: Anton Vorontsov
Thanks!
p.s. You probably want to send this to G
; Anton,
> thanks for the comment, as we discussed, the original code use 8 bit byte
> operation,
> while in fact, on some powerpc platform, 32 bit operation is needed.
> should it be possible fixed by adding some wrapper in IO accessors or
> introduce additional sdhci op?
I woul
nsigned short)-1) {
> switch (1 << power) {
> +#define ESDHCI_FSL_POWER_MASK 0x40
> +#define ESDHCI_FSL_POWER_1800x00
> +#define ESDHCI_FSL_POWER_3000x40
Same here. The driver will rot quickly if everyone would start
putting chip-specific qu
> + if (of_device_is_compatible(np, "fsl,p4080-esdhc"))
> + host->quirks |= SDHCI_QUIRK_QORIQ_HOSTCAPBLT_ONLY_VS33;
Should really use voltage-ranges, not quirks.
http://www.spinics.net/lists/linux-mmc/msg02785.html
Thanks,
--
Anton Vorontsov
Email: cbouatmai...@gmail.com
__
/* Only PCI, not PCI Express! */
> + if (of_device_is_compatible(np, "fsl,mpc8540-pci")) {
> + struct resource r[2];
How about '= {};' initializer instead of the '= NULL's down below?
> +
> +
On Wed, Jun 01, 2011 at 06:55:35PM +0400, Dmitry Eremin-Solenikov wrote:
> On 6/1/11, Anton Vorontsov wrote:
> > On Wed, Jun 01, 2011 at 04:28:11PM +0400, Dmitry Eremin-Solenikov wrote:
> > [...]
> >> --- a/arch/powerpc/sysdev/fsl_pci.h
> >> +++ b/arch/powerpc/sys
}
#endif
You won't need endless ifdefs in the board files:
#ifdef CONFIG_PCI
fsl_add_pci_err();
#endif
Also, why not add this call to the fsl_add_bridge(), so you
won't need to touch board files at all.
Thanks,
--
Anton Vorontsov
Email: cbouatmai...@gmail.com
__
):
http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg21196.html
It was received coldly though:
http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg22041.html
http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg21273.html
--
Anton Vorontsov
Email: cbouatmai...@gm
s3xxx_exit);
I don't think I like this duplicate code for each platform sub-
driver. It's repetitive and annoying. :-/
But considering that ARM will be multiplatform soon, we don't
want to have every mach-* stuff in the single sdhci-pltfm.
On Thu, May 05, 2011 at 09:22:53PM +0800, Shawn Guo wrote:
> The patch migrates the use of sdhci_of_host and sdhci_of_data to
> sdhci_pltfm_host and sdhci_pltfm_data, so that the former pair can
> be eliminated.
>
> Signed-off-by: Shawn Guo
> Reviewed-by: Grant Likely
Acked-b
On Thu, May 05, 2011 at 09:22:54PM +0800, Shawn Guo wrote:
[...]
> - * Copyright (c) 2007 Freescale Semiconductor, Inc.
> - * Copyright (c) 2009 MontaVista Software, Inc.
> - *
> - * Authors: Xiaobo Xie
> - * Anton Vorontsov
[...]
> -#ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_
e two.
I'd rather vote for renaming sdhci-of-esdhc to sdhci-esdhc-mpc. :-)
--
Anton Vorontsov
Email: cbouatmai...@gmail.com
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
f-by: Shawn Guo
> Reviewed-by: Grant Likely
> Reviewed-by: Wolfram Sang
Acked-by: Anton Vorontsov
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
as specified by errata */
> + if (((unsigned long)fcb % 0x20) > 0x18) {
> + __skb_pull(skb, GMAC_FCB_LEN);
> + skb_checksum_help(skb);
> + break;
> + }
> +
hat happened with this patch?
Thanks,
--
Anton Vorontsov
Email: cbouatmai...@gmail.com
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
eems that there are enough people in "pagesize" camp
anyway, I'd say just go ahead with the current approach. :-)
It's an additional information, so won't do any harm anyway...
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
ID (no vendor ID matching).
So, the current driver may just implement quirks like this:
if (of_device_is_compatible(np, "catalyst,24c32"))
pagesize = 32;
Or, if it's some generic pattern, something like
if (of_device_is_compatible_vendor(np, "catalyst"))
pagesize /=
compatible = "catalyst,24c32";
> reg = <0x52>;
> + pagesize = <32>;
I think you'd better drop the pagesize property altogether, and
instead make the compatible string more specific (if needed at
all. are there any '
-by: Joakim Tjernlund
It's unclear where exactly adjust_link() hangs, but the patch
looks as the right thing overall.
Thanks!
Reviewed-by: Anton Vorontsov
> ---
> drivers/net/ucc_geth.c | 10 +++---
> 1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a
will deadlock. This patch brings ucc_geth in line with
> gianfar:
>
> Don't bring the interface down and up, just reinit controller HW
> and PHY.
>
> Signed-off-by: Joakim Tjernlund
Looks sane, thanks!
Reviewed-by: Anton Vorontsov
y L2 cache controller is
not applicable (and based on Scott's comment I removed
the l2 cache compatible entry for p4080). But I guess
memory-controller is somewhat similar to all other 85xx?
If it's not, I can surely prepare a patch that removes
p4080 entry.
Thanks,
--
Anton Voronts
to clean up after ourselves.
It's already in Linus' tree.
Thanks,
- - - -
commit cd1542c8197fc3c2eb3a8301505d5d9738fab1e4
Author: Anton Vorontsov
Date: Tue Aug 10 18:03:21 2010 -0700
edac: mpc85xx: add support for new MPCxxx/P EDAC controllers
Simply add proper ID
spi_mpc8xxx_cs *cs = spi->controller_state;
> - __be32 __iomem *mode = &mspi->base->mode;
> + struct fsl_spi_reg *reg_base = (struct fsl_spi_reg *)mspi->reg_base;
No need for these type casts (the same is for the whole patch).
--
Anton Vorontsov
email: cbouatmai
atic const struct of_device_id of_fsl_espi_match[] = {
> + { .compatible = "fsl,mpc8536-espi" },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, of_fsl_espi_match);
> +
> +static struct of_platform_driver fsl_espi_driver = {
> + .driver = {
> + .name = "fsl_espi",
> + .owner = THIS_MODULE,
> + .of_match_table = of_fsl_espi_match,
> + },
> + .probe = of_fsl_espi_probe,
> + .remove = __devexit_p(of_fsl_espi_remove),
> +};
> +
> +static int __init fsl_espi_init(void)
> +{
> + return of_register_platform_driver(&fsl_espi_driver);
> +}
> +module_init(fsl_espi_init);
> +
> +static void __exit fsl_espi_exit(void)
> +{
> + of_unregister_platform_driver(&fsl_espi_driver);
> +}
> +module_exit(fsl_espi_exit);
> +
> +MODULE_AUTHOR("Mingkai Hu");
> +MODULE_DESCRIPTION("Enhanced Freescale SPI Driver");
This sounds like that this is an enhanced version of the
Freescale SPI driver, which it is not. ;-)
> +MODULE_LICENSE("GPL");
> diff --git a/drivers/spi/spi_fsl_lib.h b/drivers/spi/spi_fsl_lib.h
> index 6ae8949..9c81498 100644
> --- a/drivers/spi/spi_fsl_lib.h
> +++ b/drivers/spi/spi_fsl_lib.h
> @@ -26,6 +26,7 @@ struct mpc8xxx_spi {
> /* rx & tx bufs from the spi_transfer */
> const void *tx;
> void *rx;
> + int len;
I'd place the #ifdef CONFIG_SPI_ESPI, for documentation purposes.
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
ers don't work, then
> > it is the SPI master driver that is buggy.
>
> By the way, does this fix your problem?
>
> https://patchwork.kernel.org/patch/184752/
It shouldn't. AFAIK, eSPI is PIO-only controller, and the overrun
fix is for the DMA mode.
Thanks,
p.s.
Gala
> Cc: Grant Likely
> ---
This is not bisectable. You have to merge 1/3 and 2/3.
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozla
o muram data regions 0x0..0x2000 and
0x9000..0x9100. Note that we actually don't want "data" regions,
and the only reason why that worked is that sysdev/cpm_common.c
maps muram(0)..muram(max).
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
if (ret != 0) {
> + dev_err(&dev->dev, "failed to install irq (%d)\n",
> + fsl_lbc_ctrl_dev->irq);
> + ret = fsl_lbc_ctrl_dev->irq;
> + goto err;
> + }
> +
> + return 0;
> +
> +err:
> +
_ctrl->chips[i])
> + fsl_elbc_chip_remove(elbc_fcm_ctrl->chips[i]);
[...]
> + fsl_lbc_ctrl_dev->nand = NULL;
> + kfree(elbc_fcm_ctrl);
Will cause NULL dereference and/or use-after-free for other
elbc nand instances. To avoid that, reference counting for
elbc_fcm_ct
> > Btw, even before this patch, it seems that the driver had
> > all these bugs/races, i.e. ctrl->controller.lock was not
> > used at all. Ugh.
>
> It is used, search nand_base.c for controller->lock.
OK, now I see, the driver implements its own chip->controller
(which is ex
all. Ugh.
> fsl_lbc_ctrl_dev->nand = elbc_fcm_ctrl;
> } else
> elbc_fcm_ctrl = fsl_lbc_ctrl_dev->nand;
Per coding style this should be
} else {
elbc_fcm_ctrl = fsl_lbc_ctrl_dev->nand;
}
zeof(*bar));
> if (!bar)
> return;
> foo = bar;
> } else
> bar = foo;
This willl work of course; but I'd write it as
foo_lock();
if (!foo)
foo = alloc();
foo_unlock();
bar = foo;
bar-&
understand that you don't have to believe me, but will you believe
a compiler?
oksana:~$ cat a.c
#include
#include
char *foo;
void probe(void)
{
char *bar = NULL;
if (!foo) {
bar = malloc(sizeof(*bar));
if (!bar)
do have boards with several NAND chips (e.g.
arch/powerpc/boot/dts/mpc8610_hpcd.dts), so these issues
are all legitimate.
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
arch/powerpc/include/asm/fsl_lbc.h
> @@ -246,6 +246,7 @@ struct fsl_upm {
> int width;
> };
>
> +extern unsigned int fsl_lbc_addr(phys_addr_t addr_base);
u32 here.
Other than that, the patch looks good.
Reviewed-by: Anton Vorontsov
Thanks!
,
.of_match_table = fsl_lbc_match;
}
...
};
(Note that platform_driver.driver has of_match_table nowadays --
that's what makes it possible to seamlessly transit from
of_platform_driver to platform_driver.)
The same applies f
> > handled at non-irq context, and then reenable it when finished.
>
> The irq is level-low active.
> Will do it via disable/re-enable then.
FYI, In newer kernels you don't have to do it manually, there's
request_threaded_irq() for this.
--
Anton Vorontsov
email: cbouat
can use platform_driver (and thus
> > linux/platform_device.h).
> I'd prefer using of_platform_driver here for simplified code.
> Any special reason to use platform_device here?
In the new kernels, of_platform_driver is almost a synonym of
platform_driver, and 'of_plat
;, fsl_lbc_ctrl_dev);
> + if (ret != 0) {
> + dev_err(&ofdev->dev, "failed to install irq (%d)\n",
> + fsl_lbc_ctrl_dev->irq);
> + ret = fsl_lbc_ctrl_dev->irq;
> + goto err;
> + }
> +
> + return 0;
> +
> +err:
> + iounmap(fsl_lbc_ctrl_dev->regs);
> + kfree(fsl_lbc_ctrl_dev);
> + return ret;
> +}
> +
> +static const struct of_device_id fsl_lbc_match[] = {
> + { .compatible = "fsl,elbc", },
> + { .compatible = "fsl,pq3-localbus", },
> + { .compatible = "fsl,pq2-localbus", },
> + { .compatible = "fsl,pq2pro-localbus", },
> + {},
> +};
You need linux/mod_devicetable.h for this.
> +
> +static struct of_platform_driver fsl_lbc_ctrl_driver = {
Need linux/of_platform.h for this.
But you actually don't need of_platform_driver, as for the
new code you can use platform_driver (and thus
linux/platform_device.h).
> + .driver = {
> + .name = "fsl-lbc",
> + .of_match_table = fsl_lbc_match,
> + },
> + .probe = fsl_lbc_ctrl_probe,
> +};
> +
> +static int __init fsl_lbc_init(void)
> +{
> + return of_register_platform_driver(&fsl_lbc_ctrl_driver);
> +}
> +
No need for this empty line.
> +module_init(fsl_lbc_init);
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
u32 addrl = addr & 0x8000;
if (of_device_is_compatible(np, "fsl,elbc"))
return addrl;
return addrl | ((addr & 0x3ull) >> 19);
}
EXPORT_SYMBOL(fsl_lbc_addr);
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc
_driver = {
> +static struct of_platform_driver fsl_elbc_nand_driver = {
If you write of_platform_driver, you need linux/of_platform.h (which
you removed in this patch).
But I think that you need just 'struct platform_driver' here, and
include linux/platform_device.h.
> .driver = {
> - .name = "fsl-elbc",
> + .name = "fsl,elbc-fcm-nand",
> .owner = THIS_MODULE,
> - .of_match_table = fsl_elbc_match,
> + .of_match_table = fsl_elbc_nand_match,
> },
> - .probe = fsl_elbc_ctrl_probe,
> - .remove = fsl_elbc_ctrl_remove,
> + .probe = fsl_elbc_nand_probe,
> + .remove = fsl_elbc_nand_remove,
> };
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
atches from Anton until it's without regressions here.
Thanks Chris.
I also think that it's better to drop these series now,
and meanwhile I'll try to prepare another patchset.
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
_
On Wed, Sep 08, 2010 at 11:05:48PM +0100, Chris Ball wrote:
> Hi Anton,
>
> On Thu, Sep 09, 2010 at 01:57:50AM +0400, Anton Vorontsov wrote:
> > Thanks!
> >
> > Would be also great if you could point out which patch causes
> > most of the performance drop (if an
t? Or it could be the
patch that introduces threaded IRQ handler in whole causes
it. If so, I guess we'd need to move some of the processing to
the real IRQ context, keeping the handler lockless (if
possible) or introducing a very fine grained locking.
Thanks,
--
Anton Vorontsov
email: c
+ int ret = 0;
> > > >
> > > > no need for the initial value here.
> > > Any harm?
> >
> > Probably not as gcc will likely optimize it away,
> > but it's not needed, so why keep it there?
> habit.
;-)
Thanks,
--
Anton Voront
gt; > +static int __devinit fsl_lbc_ctrl_probe(struct of_device *ofdev,
> > > + const struct of_device_id *match)
> > > +{
> > > + int ret = 0;
> >
> > no need for the initial value here.
>
eral devices were used by the master CPU).
I think it is possible to connect two (or more) SoCs in
a such way so that two or more LBC controllers would
be visible for the Linux.
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
_
.@0 {
};
spi-dev...@1 {
};
};
};
> Is the (possibly) required driver (of_sc18is60x_spi ?) supposed to be an
> I2C slave or an SPI host driver ?
It should be an I2C driver that registers an SPI master (i.e.
calls spi_alloc_master() and spi
nder if Scott saw these patches? Cc'ed.
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
_MSEL) == BR_MS_FCM &&
> (in_be32(&lbc->bank[bank].br) &
>in_be32(&lbc->bank[bank].or) & BR_BA)
> - == res.start)
> + == convert_lbc_address(res.start))
> break;
>
> if (bank >= MAX_BANKS) {
> --
> 1.5.6.5
Thanks,
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
> + controller. Also contains some common code used by
> + drivers for specific local bus peripherals.
>
> config FSL_GTM
> bool
[...]
> diff --git a/arch/powerpc/sysdev/fsl_lbc.c b/arch/powerpc/sysdev/fsl_lbc.c
> index dceb8d1..9c9e44f 100644
> -
nality;
- By writing (if there isn't any already) a generic GPIOLIB
driver for the GPIO controller that you have, you could use
these GPIOs not only for LEDs, but also for SPI, MDIO, I2C,
MMC, and even raw NAND chips.
I.e., by choos
on/powerpc/dts-bindings/gpio/led.txt
[3] drivers/leds/ledtrig-timer.c
--
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
On Tue, Aug 31, 2010 at 10:44:14AM -0600, Grant Likely wrote:
> On Tue, Aug 31, 2010 at 2:37 AM, Anton Vorontsov
> wrote:
> > On Tue, Aug 31, 2010 at 02:03:44AM -0600, Grant Likely wrote:
> >> On Tue, Aug 24, 2010 at 01:26:23PM +0400, Anton Vorontsov wrote:
> >>
On Tue, Aug 31, 2010 at 02:03:44AM -0600, Grant Likely wrote:
> On Tue, Aug 24, 2010 at 01:26:23PM +0400, Anton Vorontsov wrote:
> > With CONFIG_GPIOLIB=n, the 'struct gpio_chip' is not declared,
> > so the following pops up on PowerPC:
> >
> > cc1: warn
1 - 100 of 1893 matches
Mail list logo