* [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL
@ 2010-01-15 7:50 Barry Song
2010-01-15 7:50 ` [PATCH 2/2] mtd-physmap: add support users can assign the probe type in board files Barry Song
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Barry Song @ 2010-01-15 7:50 UTC (permalink / raw)
To: dwmw2; +Cc: uclinux-dist-devel, linux-mtd, Barry Song
Some architectures like blackfin,h8300,m68k use ROMKERNEL to describe
kernel XIP, not like arm which uses XIP_KERNEL
Signed-off-by: Barry Song <21cnbao@gmail.com>
---
drivers/mtd/chips/Kconfig | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/chips/Kconfig b/drivers/mtd/chips/Kconfig
index 35c6a23..6c39451 100644
--- a/drivers/mtd/chips/Kconfig
+++ b/drivers/mtd/chips/Kconfig
@@ -233,7 +233,7 @@ config MTD_ABSENT
config MTD_XIP
bool "XIP aware MTD support"
depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && EXPERIMENTAL && ARCH_MTD_XIP
- default y if XIP_KERNEL
+ default y if (XIP_KERNEL || ROMKERNEL)
help
This allows MTD support to work with flash memory which is also
used for XIP purposes. If you're not sure what this is all about
--
1.5.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] mtd-physmap: add support users can assign the probe type in board files
2010-01-15 7:50 [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL Barry Song
@ 2010-01-15 7:50 ` Barry Song
2010-05-23 7:23 ` Mike Frysinger
2010-01-15 10:29 ` [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL David Woodhouse
2010-02-02 5:48 ` Artem Bityutskiy
2 siblings, 1 reply; 8+ messages in thread
From: Barry Song @ 2010-01-15 7:50 UTC (permalink / raw)
To: dwmw2; +Cc: uclinux-dist-devel, linux-mtd, Mike Frysinger, Barry Song
There are three reasons to add this support:
1. users probably know the interface type of their flashs, then probe
can be faster if they give the right type in platform data since wrong
types will not be detected.
2. sometimes, detecting can cause destory to system. For example, for
kernel XIP, detecting can cause NOR enter a mode instructions can not
be fetched right, which will make kernel crash.
3. For a new probe which is not listed in the rom_probe_types, if users
assign it in board files, physmap can still probe it.
Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
---
drivers/mtd/maps/physmap.c | 8 ++++++--
include/linux/mtd/physmap.h | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index d9603f7..3b89099 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -136,8 +136,12 @@ static int physmap_flash_probe(struct platform_device *dev)
simple_map_init(&info->map[i]);
probe_type = rom_probe_types;
- for (; info->mtd[i] == NULL && *probe_type != NULL; probe_type++)
- info->mtd[i] = do_map_probe(*probe_type, &info->map[i]);
+ if (physmap_data->probe_type == NULL) {
+ for (; info->mtd[i] == NULL && *probe_type != NULL; probe_type++)
+ info->mtd[i] = do_map_probe(*probe_type, &info->map[i]);
+ } else
+ info->mtd[i] = do_map_probe(physmap_data->probe_type, &info->map[i]);
+
if (info->mtd[i] == NULL) {
dev_err(&dev->dev, "map_probe failed\n");
err = -ENXIO;
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h
index 76f7cab..bcfd9f7 100644
--- a/include/linux/mtd/physmap.h
+++ b/include/linux/mtd/physmap.h
@@ -25,6 +25,7 @@ struct physmap_flash_data {
void (*set_vpp)(struct map_info *, int);
unsigned int nr_parts;
unsigned int pfow_base;
+ char *probe_type;
struct mtd_partition *parts;
};
--
1.5.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL
2010-01-15 7:50 [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL Barry Song
2010-01-15 7:50 ` [PATCH 2/2] mtd-physmap: add support users can assign the probe type in board files Barry Song
@ 2010-01-15 10:29 ` David Woodhouse
2010-01-15 10:34 ` [Uclinux-dist-devel] " Mike Frysinger
2010-02-02 5:48 ` Artem Bityutskiy
2 siblings, 1 reply; 8+ messages in thread
From: David Woodhouse @ 2010-01-15 10:29 UTC (permalink / raw)
To: Barry Song; +Cc: uclinux-dist-devel, linux-mtd
On Fri, 2010-01-15 at 15:50 +0800, Barry Song wrote:
> Some architectures like blackfin,h8300,m68k use ROMKERNEL to describe
> kernel XIP, not like arm which uses XIP_KERNEL
Surely the appropriate response to that realisation is to _fix_ the
inconsistency, not just work around it?
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Uclinux-dist-devel] [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL
2010-01-15 10:29 ` [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL David Woodhouse
@ 2010-01-15 10:34 ` Mike Frysinger
2010-01-16 6:35 ` Barry Song
0 siblings, 1 reply; 8+ messages in thread
From: Mike Frysinger @ 2010-01-15 10:34 UTC (permalink / raw)
To: David Woodhouse; +Cc: uclinux-dist-devel, Barry Song, linux-mtd
On Fri, Jan 15, 2010 at 05:29, David Woodhouse wrote:
> On Fri, 2010-01-15 at 15:50 +0800, Barry Song wrote:
>> Some architectures like blackfin,h8300,m68k use ROMKERNEL to describe
>> kernel XIP, not like arm which uses XIP_KERNEL
>
> Surely the appropriate response to that realisation is to _fix_ the
> inconsistency, not just work around it?
agree, but this is a lot easier than trying to tell RMK to change all
the ARM references ;)
this is the only place outside of the respective arch/$ARCH/ where
either XIP_KERNEL or ROMKERNEL is utilized ...
-mike
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Uclinux-dist-devel] [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL
2010-01-15 10:34 ` [Uclinux-dist-devel] " Mike Frysinger
@ 2010-01-16 6:35 ` Barry Song
0 siblings, 0 replies; 8+ messages in thread
From: Barry Song @ 2010-01-16 6:35 UTC (permalink / raw)
To: Mike Frysinger; +Cc: uclinux-dist-devel, David Woodhouse, linux-mtd
On Fri, Jan 15, 2010 at 6:34 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
> On Fri, Jan 15, 2010 at 05:29, David Woodhouse wrote:
>> On Fri, 2010-01-15 at 15:50 +0800, Barry Song wrote:
>>> Some architectures like blackfin,h8300,m68k use ROMKERNEL to describe
>>> kernel XIP, not like arm which uses XIP_KERNEL
>>
>> Surely the appropriate response to that realisation is to _fix_ the
>> inconsistency, not just work around it?
>
> agree, but this is a lot easier than trying to tell RMK to change all
> the ARM references ;)
Yes. It will be really difficult to ask the related architectures to change.
>
> this is the only place outside of the respective arch/$ARCH/ where
> either XIP_KERNEL or ROMKERNEL is utilized ...
> -mike
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL
2010-01-15 7:50 [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL Barry Song
2010-01-15 7:50 ` [PATCH 2/2] mtd-physmap: add support users can assign the probe type in board files Barry Song
2010-01-15 10:29 ` [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL David Woodhouse
@ 2010-02-02 5:48 ` Artem Bityutskiy
2010-03-22 5:40 ` Barry Song
2 siblings, 1 reply; 8+ messages in thread
From: Artem Bityutskiy @ 2010-02-02 5:48 UTC (permalink / raw)
To: Barry Song; +Cc: uclinux-dist-devel, dwmw2, linux-mtd
On Fri, 2010-01-15 at 15:50 +0800, Barry Song wrote:
> Some architectures like blackfin,h8300,m68k use ROMKERNEL to describe
> kernel XIP, not like arm which uses XIP_KERNEL
>
> Signed-off-by: Barry Song <21cnbao@gmail.com>
I've pushed these 2 patches to my l2-mtd-2.6 / dunno
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL
2010-02-02 5:48 ` Artem Bityutskiy
@ 2010-03-22 5:40 ` Barry Song
0 siblings, 0 replies; 8+ messages in thread
From: Barry Song @ 2010-03-22 5:40 UTC (permalink / raw)
To: dedekind1; +Cc: uclinux-dist-devel, dwmw2, linux-mtd
On Tue, Feb 2, 2010 at 1:48 PM, Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Fri, 2010-01-15 at 15:50 +0800, Barry Song wrote:
>> Some architectures like blackfin,h8300,m68k use ROMKERNEL to describe
>> kernel XIP, not like arm which uses XIP_KERNEL
>>
>> Signed-off-by: Barry Song <21cnbao@gmail.com>
>
> I've pushed these 2 patches to my l2-mtd-2.6 / dunno
Will they be merged into mainline? I have found them in Linus's tree yet.
>
> --
> Best Regards,
> Artem Bityutskiy (Артём Битюцкий)
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mtd-physmap: add support users can assign the probe type in board files
2010-01-15 7:50 ` [PATCH 2/2] mtd-physmap: add support users can assign the probe type in board files Barry Song
@ 2010-05-23 7:23 ` Mike Frysinger
0 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2010-05-23 7:23 UTC (permalink / raw)
To: dwmw2; +Cc: uclinux-dist-devel, linux-mtd
On Fri, Jan 15, 2010 at 03:50, Barry Song wrote:
> There are three reasons to add this support:
> 1. users probably know the interface type of their flashs, then probe
> can be faster if they give the right type in platform data since wrong
> types will not be detected.
> 2. sometimes, detecting can cause destory to system. For example, for
> kernel XIP, detecting can cause NOR enter a mode instructions can not
> be fetched right, which will make kernel crash.
> 3. For a new probe which is not listed in the rom_probe_types, if users
> assign it in board files, physmap can still probe it.
any input on this patch ? doesnt seem to be in post 2.6.34 merges ...
-mike
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-05-23 7:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15 7:50 [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL Barry Song
2010-01-15 7:50 ` [PATCH 2/2] mtd-physmap: add support users can assign the probe type in board files Barry Song
2010-05-23 7:23 ` Mike Frysinger
2010-01-15 10:29 ` [PATCH 1/2] let MTD_XIP depend on XIP_KERNEL or ROMKERNEL David Woodhouse
2010-01-15 10:34 ` [Uclinux-dist-devel] " Mike Frysinger
2010-01-16 6:35 ` Barry Song
2010-02-02 5:48 ` Artem Bityutskiy
2010-03-22 5:40 ` Barry Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox