* [PATCH] mioa701: add newly available DoC G3 chip
@ 2011-12-17 11:49 Robert Jarzmik
2011-12-19 4:06 ` Haojian Zhuang
2011-12-22 8:28 ` Haojian Zhuang
0 siblings, 2 replies; 4+ messages in thread
From: Robert Jarzmik @ 2011-12-17 11:49 UTC (permalink / raw)
To: linux-arm-kernel
From: Robert Jarzmik <robert.jarzmik@atosorigin.com>
As the mioa701 board has a M-Systems DiskOnChip G3 chip, add
it to the platform resources of the board.
Signed-off-by: Robert Jarzmik <robert.jarzmik@atosorigin.com>
---
arch/arm/mach-pxa/mioa701.c | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index b938fc2..dba02b7 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -53,6 +53,7 @@
#include <mach/pxa27x-udc.h>
#include <mach/camera.h>
#include <mach/audio.h>
+#include <mach/smemc.h>
#include <media/soc_camera.h>
#include <mach/mioa701.h>
@@ -390,24 +391,19 @@ static struct pxamci_platform_data mioa701_mci_info = {
};
/* FlashRAM */
-static struct resource strataflash_resource = {
+static struct resource docg3_resource = {
.start = PXA_CS0_PHYS,
- .end = PXA_CS0_PHYS + SZ_64M - 1,
+ .end = PXA_CS0_PHYS + SZ_8K - 1,
.flags = IORESOURCE_MEM,
};
-static struct physmap_flash_data strataflash_data = {
- .width = 2,
- /* .set_vpp = mioa701_set_vpp, */
-};
-
-static struct platform_device strataflash = {
- .name = "physmap-flash",
+static struct platform_device docg3 = {
+ .name = "docg3",
.id = -1,
- .resource = &strataflash_resource,
+ .resource = &docg3_resource,
.num_resources = 1,
.dev = {
- .platform_data = &strataflash_data,
+ .platform_data = NULL,
},
};
@@ -685,7 +681,7 @@ static struct platform_device *devices[] __initdata = {
&pxa2xx_pcm,
&mioa701_sound,
&power_dev,
- &strataflash,
+ &docg3,
&gpio_vbus,
&mioa701_camera,
&mioa701_board,
@@ -720,6 +716,15 @@ static void __init mioa701_machine_init(void)
RTTR = 32768 - 1; /* Reset crazy WinCE value */
UP2OCR = UP2OCR_HXOE;
+ /*
+ * Set up the flash memory : DiskOnChip G3 on first static memory bank
+ */
+ __raw_writel(0x7ff02dd8, MSC0);
+ __raw_writel(0x0001c391, MCMEM0);
+ __raw_writel(0x0001c391, MCATT0);
+ __raw_writel(0x0001c391, MCIO0);
+
+
pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
pxa_set_ffuart_info(NULL);
pxa_set_btuart_info(NULL);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] mioa701: add newly available DoC G3 chip
2011-12-17 11:49 [PATCH] mioa701: add newly available DoC G3 chip Robert Jarzmik
@ 2011-12-19 4:06 ` Haojian Zhuang
2011-12-19 8:09 ` Robert Jarzmik
2011-12-22 8:28 ` Haojian Zhuang
1 sibling, 1 reply; 4+ messages in thread
From: Haojian Zhuang @ 2011-12-19 4:06 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Dec 17, 2011 at 7:49 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> From: Robert Jarzmik <robert.jarzmik@atosorigin.com>
>
> As the mioa701 board has a M-Systems DiskOnChip G3 chip, add
> it to the platform resources of the board.
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@atosorigin.com>
> ---
> ?arch/arm/mach-pxa/mioa701.c | ? 29 +++++++++++++++++------------
> ?1 files changed, 17 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
> index b938fc2..dba02b7 100644
> --- a/arch/arm/mach-pxa/mioa701.c
> +++ b/arch/arm/mach-pxa/mioa701.c
> @@ -53,6 +53,7 @@
> ?#include <mach/pxa27x-udc.h>
> ?#include <mach/camera.h>
> ?#include <mach/audio.h>
> +#include <mach/smemc.h>
> ?#include <media/soc_camera.h>
>
> ?#include <mach/mioa701.h>
> @@ -390,24 +391,19 @@ static struct pxamci_platform_data mioa701_mci_info = {
> ?};
>
> ?/* FlashRAM */
> -static struct resource strataflash_resource = {
> +static struct resource docg3_resource = {
> ? ? ? ?.start = PXA_CS0_PHYS,
> - ? ? ? .end ? = PXA_CS0_PHYS + SZ_64M - 1,
> + ? ? ? .end ? = PXA_CS0_PHYS + SZ_8K - 1,
> ? ? ? ?.flags = IORESOURCE_MEM,
> ?};
You resized the flash from 64MB to 8KB. It surprised me that the flash
size is only 8KB. Could you help to check this?
>
> -static struct physmap_flash_data strataflash_data = {
> - ? ? ? .width = 2,
> - ? ? ? /* .set_vpp = mioa701_set_vpp, */
> -};
> -
> -static struct platform_device strataflash = {
> - ? ? ? .name ? ? ? ? ?= "physmap-flash",
> +static struct platform_device docg3 = {
> + ? ? ? .name ? ? ? ? ?= "docg3",
> ? ? ? ?.id ? ? ? ? ? ?= -1,
> - ? ? ? .resource ? ? ?= &strataflash_resource,
> + ? ? ? .resource ? ? ?= &docg3_resource,
> ? ? ? ?.num_resources = 1,
> ? ? ? ?.dev = {
> - ? ? ? ? ? ? ? .platform_data = &strataflash_data,
> + ? ? ? ? ? ? ? .platform_data = NULL,
> ? ? ? ?},
> ?};
>
> @@ -685,7 +681,7 @@ static struct platform_device *devices[] __initdata = {
> ? ? ? ?&pxa2xx_pcm,
> ? ? ? ?&mioa701_sound,
> ? ? ? ?&power_dev,
> - ? ? ? &strataflash,
> + ? ? ? &docg3,
> ? ? ? ?&gpio_vbus,
> ? ? ? ?&mioa701_camera,
> ? ? ? ?&mioa701_board,
> @@ -720,6 +716,15 @@ static void __init mioa701_machine_init(void)
> ? ? ? ?RTTR = 32768 - 1; /* Reset crazy WinCE value */
> ? ? ? ?UP2OCR = UP2OCR_HXOE;
>
> + ? ? ? /*
> + ? ? ? ?* Set up the flash memory : DiskOnChip G3 on first static memory bank
> + ? ? ? ?*/
> + ? ? ? __raw_writel(0x7ff02dd8, MSC0);
> + ? ? ? __raw_writel(0x0001c391, MCMEM0);
> + ? ? ? __raw_writel(0x0001c391, MCATT0);
> + ? ? ? __raw_writel(0x0001c391, MCIO0);
> +
> +
> ? ? ? ?pxa2xx_mfp_config(ARRAY_AND_SIZE(mioa701_pin_config));
> ? ? ? ?pxa_set_ffuart_info(NULL);
> ? ? ? ?pxa_set_btuart_info(NULL);
> --
> 1.7.5.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mioa701: add newly available DoC G3 chip
2011-12-19 4:06 ` Haojian Zhuang
@ 2011-12-19 8:09 ` Robert Jarzmik
0 siblings, 0 replies; 4+ messages in thread
From: Robert Jarzmik @ 2011-12-19 8:09 UTC (permalink / raw)
To: linux-arm-kernel
Haojian Zhuang <haojian.zhuang@gmail.com> writes:
>> -static struct resource strataflash_resource = {
>> +static struct resource docg3_resource = {
>> ? ? ? ?.start = PXA_CS0_PHYS,
>> - ? ? ? .end ? = PXA_CS0_PHYS + SZ_64M - 1,
>> + ? ? ? .end ? = PXA_CS0_PHYS + SZ_8K - 1,
>> ? ? ? ?.flags = IORESOURCE_MEM,
>> ?};
>
> You resized the flash from 64MB to 8KB. It surprised me that the flash
> size is only 8KB. Could you help to check this?
Checked and confirmed, it's 8K.
The docg3 has a mapped IO space, where :
- 0x0 - 0x7ff : boot memory (NOR like)
- 0x800 - 0xfff : data area
- 0x1000 - 0x17ff : registers area
- 0x1800 - 0x1fff : boot memory (the same one as before)
And the previous "64MB" was because I didn't know which kind of memory was
there, and a static bank can be as big as 64MB.
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] mioa701: add newly available DoC G3 chip
2011-12-17 11:49 [PATCH] mioa701: add newly available DoC G3 chip Robert Jarzmik
2011-12-19 4:06 ` Haojian Zhuang
@ 2011-12-22 8:28 ` Haojian Zhuang
1 sibling, 0 replies; 4+ messages in thread
From: Haojian Zhuang @ 2011-12-22 8:28 UTC (permalink / raw)
To: linux-arm-kernel
On Sat, Dec 17, 2011 at 7:49 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> From: Robert Jarzmik <robert.jarzmik@atosorigin.com>
>
> As the mioa701 board has a M-Systems DiskOnChip G3 chip, add
> it to the platform resources of the board.
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@atosorigin.com>
> ---
> ?arch/arm/mach-pxa/mioa701.c | ? 29 +++++++++++++++++------------
> ?1 files changed, 17 insertions(+), 12 deletions(-)
>
Applied
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-22 8:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-17 11:49 [PATCH] mioa701: add newly available DoC G3 chip Robert Jarzmik
2011-12-19 4:06 ` Haojian Zhuang
2011-12-19 8:09 ` Robert Jarzmik
2011-12-22 8:28 ` Haojian Zhuang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.