sh: rsk7203 CONFIG_MTD=n fix
PATCH 1/1 sh: rsk7203 CONFIG_MTD=n fix
From: Magnus Damm <[email protected]>
Fix the rsk7203 board code to build with CONFIG_MTD=n.
---
arch/sh/boards/mach-rsk/devices-rsk7203.c | 4 ---- arch/sh/boards/mach-rsk/setup.c | 23 ++++++++++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-)
arch/sh/boards/mach-rsk/devices-rsk7203.c +0 -4
@@ -11,10 +11,6 @@#include <linux/types.h> #include <linux/platform_device.h> #include <linux/interrupt.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/physmap.h> -#include <linux/mtd/map.h> #include <linux/smsc911x.h> #include <linux/gpio.h> #include <linux/leds.h>
arch/sh/boards/mach-rsk/setup.c +14 -9
@@ -15,14 +15,12 @@#include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <linux/mtd/physmap.h> +#ifdef CONFIG_MTD #include <linux/mtd/map.h> +#endif #include <asm/machvec.h> #include <asm/io.h> -static const char *probes[] = {"cmdlinepart" ,NULL }; - -static struct mtd_partition *parsed_partitions; -static struct mtd_partition rsk_partitions[] = { { .name ="Bootloader" ,
@@ -41,6 +39,8 @@ static struct mtd_partition rsk_partitio };static struct physmap_flash_data flash_data = { + .parts = rsk_partitions, + .nr_parts =ARRAY_SIZE (rsk_partitions), .width =2 , };
@@ -60,7 +60,8 @@ static struct platform_device flash_devi }, }; -static struct mtd_info *flash_mtd; +#ifdef CONFIG_MTD +static const char *probes[] = {"cmdlinepart" ,NULL };static struct map_info rsk_flash_map = { .name = "RSK+ Flash",
@@ -68,6 +69,10 @@ static struct map_info rsk_flash_map = { .bankwidth = 2, }; +static struct mtd_info *flash_mtd; + +static struct mtd_partition *parsed_partitions; +static void __init set_mtd_partitions (void ) {int nr_parts =0 ;
@@ -77,14 +82,14 @@ static void __init set_mtd_partitions(vo nr_parts =parse_mtd_partitions (flash_mtd, probes, &parsed_partitions,0 );/* If there is no partition table, used the hard coded table */ -if (nr_parts <=0 ) { - flash_data.parts = rsk_partitions; - flash_data.nr_parts =ARRAY_SIZE (rsk_partitions); - }else { +if (nr_parts >0 ) { flash_data.nr_parts = nr_parts; flash_data.parts = parsed_partitions; } } +#else +static inline void set_mtd_partitions (void ) {} +#endif static struct platform_device *rsk_devices[]__initdata = { &flash_device,
Hi, all
just in these days I'm designing a new custom borad derived from rsk7203. I'd like to use linux-sh instead of uc-linux.
What toolchain should I use?
Where can I find the git user manual
Thanks a lot
Reagrds
Alle 11:08, lunedì 26 ottobre 2009, Magnus Damm ha scritto:
Quoted 96 lines
From: Magnus Damm <[email protected]>
Fix the rsk7203 board code to build with
CONFIG_MTD=n.Signed-off-by Magnus Damm <[email protected]>---
arch/sh/boards/mach-rsk/devices-rsk7203.c | 4 ---- arch/sh/boards/mach-rsk/setup.c | 23 ++++++++++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-)arch/sh/boards/mach-rsk/devices-rsk7203.c +0
-012:32:26.000000000 +0900 @@ -11,10 +11,6 @@
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>arch/sh/boards/mach-rsk/devices-rsk7203.c +0
-4-#include <linux/mtd/mtd.h> -#include <linux/mtd/partitions.h> -#include <linux/mtd/physmap.h> -#include <linux/mtd/map.h> #include <linux/smsc911x.h> #include <linux/gpio.h> #include <linux/leds.h> arch/sh/boards/mach-rsk/setup.c +15
-10+0900 @@ -15,14 +15,12 @@#include <linux/mtd/mtd.h> #include <linux/mtd/partitions.h> #include <linux/mtd/physmap.h> +#ifdef CONFIG_MTD #include <linux/mtd/map.h> +#endif #include <asm/machvec.h> #include <asm/io.h> -static const char *probes[] = {"cmdlinepart" ,NULL }; - -static struct mtd_partition *parsed_partitions; -static struct mtd_partition rsk_partitions[] = { { .name ="Bootloader" ,@@ -41,6 +39,8 @@ static struct mtd_partition rsk_partitio };static struct physmap_flash_data flash_data = { + .parts = rsk_partitions, + .nr_parts =ARRAY_SIZE (rsk_partitions), .width =2 , };@@ -60,7 +60,8 @@ static struct platform_device flash_devi }, }; -static struct mtd_info *flash_mtd; +#ifdef CONFIG_MTD +static const char *probes[] = {"cmdlinepart" ,NULL };static struct map_info rsk_flash_map = { .name = "RSK+ Flash",@@ -68,6 +69,10 @@ static struct map_info rsk_flash_map = { .bankwidth = 2, }; +static struct mtd_info *flash_mtd; + +static struct mtd_partition *parsed_partitions; +static void __init set_mtd_partitions (void ) {int nr_parts =0 ;@@ -77,14 +82,14 @@ static void __init set_mtd_partitions(vo nr_parts =parse_mtd_partitions (flash_mtd, probes, &parsed_partitions,0 );/* If there is no partition table, used the hard coded table */ -if (nr_parts <=0 ) { - flash_data.parts = rsk_partitions; - flash_data.nr_parts =ARRAY_SIZE (rsk_partitions); - }else { +if (nr_parts >0 ) { flash_data.nr_parts = nr_parts; flash_data.parts = parsed_partitions; } } +#else +static inline void set_mtd_partitions (void ) {} +#endif static struct platform_device *rsk_devices[]__initdata = { &flash_device, --To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 10 lines
Fabio Giovagnini Aurion s.r.l. CF e P.IVA 00885711200 Tel. +39.335.8350919 www.aurion-tech.com account telefono VoIP skype (www.skype.com): aurion.giovagnini
Hey Fabio,
Quoted 3 lines · Fabio Giovagnini
just in these days I'm designing a new custom borad derived from rsk7203. I'd like to use linux-sh instead of uc-linux.
What toolchain should I use?
Try the latest codesourcery toolchain. I use that for kernel development. For user space I'm not sure.
Quoted 1 line
Where can I find the git user manual
Good question. I suspect that there are a wide range of documents available for git, but I don't think I'm the right person to give any advice about that.
Cheers,
/ magnus
Paul Mundt
AppliedQuoted 1 line · Magnus Damm
Fix the rsk7203 board code to build with
CONFIG_MTD=n.
Quoted 3 lines · Magnus Damm
Add an uImage.bin target to allow uncompressed uImages. Useful for boards with busted u-boot decompression like the rsk7203 on my desk.
Applied to the 2.6.32 queue, thanks.
OK. Thanks a lot.
Did you build any application for rsk7203?
I used MCP data environment, but it is without g++, so I cannot use libraries as SDL, qt embedded, or more.
I think exculding all the g++ stuff is not strategic.
Alle 11:56, lunedì 26 ottobre 2009, Magnus Damm ha scritto:
Quoted 25 lines
Hey Fabio,
On Mon, Oct 26, 2009 at 7:23 PM, Fabio Giovagnini
Quoted 3 lines · <[email protected]> wrote:
just in these days I'm designing a new custom borad derived from rsk7203. I'd like to use linux-sh instead of uc-linux.
What toolchain should I use?Try the latest codesourcery toolchain. I use that for kernel development. For user space I'm not sure.
Quoted 1 line
Where can I find the git user manual
Good question. I suspect that there are a wide range of documents available for git, but I don't think I'm the right person to give any advice about that.
Cheers,
/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 10 lines
Fabio Giovagnini Aurion s.r.l. CF e P.IVA 00885711200 Tel. +39.335.8350919 www.aurion-tech.com account telefono VoIP skype (www.skype.com): aurion.giovagnini
Quoted 6 lines · Fabio Giovagnini
OK. Thanks a lot.
Did you build any application for rsk7203?
I used MCP data environment, but it is without g++, so I cannot use libraries as SDL, qt embedded, or more.
I think exculding all the g++ stuff is not strategic.
Then talk to MPC about it. This is not an MPC support forum, and obviously we do not recommend using antiquated toolchains.
The CodeSourcery toolchain is the only one that is current and supported, although the SH-FDPIC toolchain aimed at SH-2A is not yet publically available. However you can of course take the source and attempt to construct a FLAT toolchain from it in the interim (although this too would result in a currently unsupported configuration).
I hacked the previuos MCP data toolchain and I got g++ runnung, so I was able to compile and run SDL based applications.
Now I start from u-boot to manage the board from the reset. Later I'll approach the problem of user space applications.
Coudesourgery toolchian is uClibc based or glibc based?
Thanksa alot
Alle 13:12, lunedì 26 ottobre 2009, Paul Mundt ha scritto:
Quoted 19 lines · Fabio Giovagnini
Quoted 5 lines
OK. Thanks a lot.
Did you build any application for rsk7203?
I used MCP data environment, but it is without g++, so I cannot use libraries as SDL, qt embedded, or more.
I think exculding all the g++ stuff is not strategic.Then talk to MPC about it. This is not an MPC support forum, and obviously we do not recommend using antiquated toolchains.
The CodeSourcery toolchain is the only one that is current and supported, although the SH-FDPIC toolchain aimed at SH-2A is not yet publically available. However you can of course take the source and attempt to construct a FLAT toolchain from it in the interim (although this too would result in a currently unsupported configuration).
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 10 lines
Fabio Giovagnini Aurion s.r.l. CF e P.IVA 00885711200 Tel. +39.335.8350919 www.aurion-tech.com account telefono VoIP skype (www.skype.com): aurion.giovagnini
Is this the propèer repository where to clone kernel from? git clone git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git
Thanks a lot
Alle 14:49, lunedì 26 ottobre 2009, Fabio Giovagnini ha scritto:
Quoted 28 lines
I hacked the previuos MCP data toolchain and I got g++ runnung, so I was able to compile and run SDL based applications.
Now I start from u-boot to manage the board from the reset. Later I'll approach the problem of user space applications. Coudesourgery toolchian is uClibc based or glibc based?Thanksa alot
Alle 13:12, lunedì 26 ottobre 2009, Paul Mundt ha scritto:
Quoted 19 lines · Fabio Giovagnini
Quoted 5 lines
OK. Thanks a lot.
Did you build any application for rsk7203?
I used MCP data environment, but it is without g++, so I cannot use libraries as SDL, qt embedded, or more.
I think exculding all the g++ stuff is not strategic.Then talk to MPC about it. This is not an MPC support forum, and obviously we do not recommend using antiquated toolchains.
The CodeSourcery toolchain is the only one that is current and supported, although the SH-FDPIC toolchain aimed at SH-2A is not yet publically available. However you can of course take the source and attempt to construct a FLAT toolchain from it in the interim (although this too would result in a currently unsupported configuration).
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 10 lines
Fabio Giovagnini Aurion s.r.l. CF e P.IVA 00885711200 Tel. +39.335.8350919 www.aurion-tech.com account telefono VoIP skype (www.skype.com): aurion.giovagnini
Quoted 3 lines · Fabio Giovagnini
Is this the prop?er repository where to clone kernel from? git clone
git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git
Fabio, if you have specific questions, start a new thread, rather than hijacking existing ones. Beyond that, all of these sorts of questions are answered on the wiki at http://www.linux-sh.org.
Sorry Lethal, for my improper use of the thread.
I aplogize to everyone for my mistake.
About http://www.linux-sh.org I have read more and more and it is not so clear.
Maybe I'm not so smart, or I'have been out of main stream for a very long time.
Excuse me again.
Alle 22:15, lunedì 26 ottobre 2009, Paul Mundt ha scritto:
Quoted 11 lines · Fabio Giovagnini
Quoted 2 lines
Is this the prop?er repository where to clone kernel from? git clone
git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.gitFabio, if you have specific questions, start a new thread, rather than hijacking existing ones. Beyond that, all of these sorts of questions are answered on the wiki at http://www.linux-sh.org.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 10 lines
Fabio Giovagnini Aurion s.r.l. CF e P.IVA 00885711200 Tel. +39.335.8350919 www.aurion-tech.com account telefono VoIP skype (www.skype.com): aurion.giovagnini
Quoted 8 lines · Fabio Giovagnini
Sorry Lethal, for my improper use of the thread.
I aplogize to everyone for my mistake.
About http://www.linux-sh.org I have read more and more and it is not so clear.
Maybe I'm not so smart, or I'have been out of main stream for a very long time.
Excuse me again.
The relevant bits are here:
http://linux-sh.org/cgi-bin/moin.cgi/Getting_source
if you wish to pull from the SH staging tree, than the git url you mentioned is the correct one. On the other hand, it can either be ahead or behind whatever is in Linus's tree, so unless you are doing active development, you can just as easily use that.
You will also find a link to documentation on using git from that page.
Thanks very much.
I'll try to disturb as few as possible.
Regards
Alle 22:42, lunedì 26 ottobre 2009, Paul Mundt ha scritto:
Quoted 23 lines · Fabio Giovagnini
Quoted 7 lines
Sorry Lethal, for my improper use of the thread.
I aplogize to everyone for my mistake.
About http://www.linux-sh.org I have read more and more and it is not so clear.
Maybe I'm not so smart, or I'have been out of main stream for a very long time.
Excuse me again.The relevant bits are here:
http://linux-sh.org/cgi-bin/moin.cgi/Getting_source
if you wish to pull from the SH staging tree, than the git url you mentioned is the correct one. On the other hand, it can either be ahead or behind whatever is in Linus's tree, so unless you are doing active development, you can just as easily use that.
You will also find a link to documentation on using git from that page. --
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 10 lines
Fabio Giovagnini Aurion s.r.l. CF e P.IVA 00885711200 Tel. +39.335.8350919 www.aurion-tech.com account telefono VoIP skype (www.skype.com): aurion.giovagnini