* [PATCH/master] ARM/Samsung: A required fix and a cleanup @ 2012-07-20 6:56 Juergen Beisert 2012-07-20 6:56 ` [PATCH 1/3] ARM/Samsung: be able to include the nand header multiple times Juergen Beisert ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: Juergen Beisert @ 2012-07-20 6:56 UTC (permalink / raw) To: barebox Some fixes and cleanups for master related to boards based on the Samsung S3C24XX CPU. The following changes since commit b78e5fe9f3ce155065831d3aa8a480656a8f53c5: commands/crc: assert newline after output with big offsets (2012-07-17 20:41:17 +0200) are available in the git repository at: git://git.pengutronix.de/git/jbe/barebox.git for_master_s3c24xx_runtime_fix_and_cleanup for you to fetch changes up to b47220d7f70df9191fc456dbcaeaa6ead72c6c02: NAND/Samsung: remove a leftover from architeture clean ups (2012-07-20 08:41:35 +0200) ---------------------------------------------------------------- Juergen Beisert (3): ARM/Samsung: be able to include the nand header multiple times ARM/Samsung: unify device registration for the S3C24XX SoCs NAND/Samsung: remove a leftover from architeture clean ups arch/arm/boards/a9m2410/a9m2410.c | 7 ++- arch/arm/boards/a9m2440/a9m2440.c | 7 ++- arch/arm/boards/mini2440/mini2440.c | 16 +++--- .../mach-samsung/include/mach/devices-s3c24xx.h | 55 ++++++++++++++++++++ arch/arm/mach-samsung/include/mach/s3c24xx-nand.h | 5 ++ drivers/mtd/nand/Makefile | 1 - 6 files changed, 72 insertions(+), 19 deletions(-) create mode 100644 arch/arm/mach-samsung/include/mach/devices-s3c24xx.h _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] ARM/Samsung: be able to include the nand header multiple times 2012-07-20 6:56 [PATCH/master] ARM/Samsung: A required fix and a cleanup Juergen Beisert @ 2012-07-20 6:56 ` Juergen Beisert 2012-07-20 6:56 ` [PATCH 2/3] ARM/Samsung: unify device registration for the S3C24XX SoCs Juergen Beisert ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Juergen Beisert @ 2012-07-20 6:56 UTC (permalink / raw) To: barebox This is required in preparation for the following patches. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> --- arch/arm/mach-samsung/include/mach/s3c24xx-nand.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h b/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h index acd78b8..fa88da1 100644 --- a/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h +++ b/arch/arm/mach-samsung/include/mach/s3c24xx-nand.h @@ -18,6 +18,9 @@ * */ +#ifndef MACH_S3C24XX_NAND_H +# define MACH_S3C24XX_NAND_H + #ifdef CONFIG_S3C_NAND_BOOT extern void s3c24x0_nand_load_image(void*, int, int); #endif @@ -52,3 +55,5 @@ struct s3c24x0_nand_platform_data { * @file * @brief Basic declaration to use the s3c24x0 NAND driver */ + +#endif /* MACH_S3C24XX_NAND_H */ -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] ARM/Samsung: unify device registration for the S3C24XX SoCs 2012-07-20 6:56 [PATCH/master] ARM/Samsung: A required fix and a cleanup Juergen Beisert 2012-07-20 6:56 ` [PATCH 1/3] ARM/Samsung: be able to include the nand header multiple times Juergen Beisert @ 2012-07-20 6:56 ` Juergen Beisert 2012-07-20 6:56 ` [PATCH 3/3] NAND/Samsung: remove a leftover from architeture clean ups Juergen Beisert 2012-07-20 7:53 ` [PATCH/master] ARM/Samsung: A required fix and a cleanup Sascha Hauer 3 siblings, 0 replies; 5+ messages in thread From: Juergen Beisert @ 2012-07-20 6:56 UTC (permalink / raw) To: barebox Barebox crashes since it has trouble with a resource size of 0. Most of the S3C24XX based platforms crashes at runtime and can't use devices with resource sizes of 0 anymore. This patch fix it by unifying the device registration for all current Barebox's S3C24XX based platforms. - A9M2410 and A9M2440 compile time tested only. - Mini2440 also runtime tested. Signed-off-by: Juergen Beisert <jbe@pengutronix.de> --- arch/arm/boards/a9m2410/a9m2410.c | 7 ++- arch/arm/boards/a9m2440/a9m2440.c | 7 ++- arch/arm/boards/mini2440/mini2440.c | 16 +++--- .../mach-samsung/include/mach/devices-s3c24xx.h | 55 ++++++++++++++++++++ 4 files changed, 67 insertions(+), 18 deletions(-) create mode 100644 arch/arm/mach-samsung/include/mach/devices-s3c24xx.h diff --git a/arch/arm/boards/a9m2410/a9m2410.c b/arch/arm/boards/a9m2410/a9m2410.c index eaafdbd..e2044a9 100644 --- a/arch/arm/boards/a9m2410/a9m2410.c +++ b/arch/arm/boards/a9m2410/a9m2410.c @@ -32,6 +32,7 @@ #include <partition.h> #include <nand.h> #include <io.h> +#include <mach/devices-s3c24xx.h> #include <mach/s3c-iomap.h> #include <mach/s3c24xx-nand.h> #include <mach/s3c-generic.h> @@ -109,8 +110,7 @@ static int a9m2410_devices_init(void) writel(reg, S3C_MISCCR); /* ----------- the devices the boot loader should work with -------- */ - add_generic_device("s3c24x0_nand", DEVICE_ID_DYNAMIC, NULL, S3C24X0_NAND_BASE, - 0, IORESOURCE_MEM, &nand_info); + s3c24xx_add_nand(&nand_info); /* * SMSC 91C111 network controller on the baseboard * connected to CS line 1 and interrupt line @@ -145,8 +145,7 @@ void __bare_init nand_boot(void) static int a9m2410_console_init(void) { - add_generic_device("s3c_serial", DEVICE_ID_DYNAMIC, NULL, S3C_UART1_BASE, - S3C_UART1_SIZE, IORESOURCE_MEM, NULL); + s3c24xx_add_uart1(); return 0; } diff --git a/arch/arm/boards/a9m2440/a9m2440.c b/arch/arm/boards/a9m2440/a9m2440.c index 1d20248..8975c15 100644 --- a/arch/arm/boards/a9m2440/a9m2440.c +++ b/arch/arm/boards/a9m2440/a9m2440.c @@ -32,6 +32,7 @@ #include <partition.h> #include <nand.h> #include <io.h> +#include <mach/devices-s3c24xx.h> #include <mach/s3c-iomap.h> #include <mach/s3c24xx-nand.h> #include <mach/s3c-generic.h> @@ -129,8 +130,7 @@ static int a9m2440_devices_init(void) writel(reg, S3C_MISCCR); /* ----------- the devices the boot loader should work with -------- */ - add_generic_device("s3c24x0_nand", DEVICE_ID_DYNAMIC, NULL, S3C24X0_NAND_BASE, 0, - IORESOURCE_MEM, &nand_info); + s3c24xx_add_nand(&nand_info); /* * cs8900 network controller onboard * Connected to CS line 5 + A24 and interrupt line EINT9, @@ -164,8 +164,7 @@ void __bare_init nand_boot(void) static int a9m2440_console_init(void) { - add_generic_device("s3c_serial", DEVICE_ID_DYNAMIC, NULL, S3C_UART1_BASE, - S3C_UART1_SIZE, IORESOURCE_MEM, NULL); + s3c24xx_add_uart1(); return 0; } diff --git a/arch/arm/boards/mini2440/mini2440.c b/arch/arm/boards/mini2440/mini2440.c index 3d3b820..3523949 100644 --- a/arch/arm/boards/mini2440/mini2440.c +++ b/arch/arm/boards/mini2440/mini2440.c @@ -39,6 +39,7 @@ #include <io.h> #include <mach/gpio.h> #include <mach/s3c-iomap.h> +#include <mach/devices-s3c24xx.h> #include <mach/s3c24xx-nand.h> #include <mach/s3c-generic.h> #include <mach/s3c-mci.h> @@ -297,8 +298,7 @@ static int mini2440_devices_init(void) reg |= 0x10000; writel(reg, S3C_MISCCR); - add_generic_device("s3c24x0_nand", DEVICE_ID_DYNAMIC, NULL, S3C24X0_NAND_BASE, - 0, IORESOURCE_MEM, &nand_info); + s3c24xx_add_nand(&nand_info); add_dm9000_device(0, S3C_CS4_BASE + 0x300, S3C_CS4_BASE + 0x304, IORESOURCE_MEM_16BIT, &dm9000_data); @@ -312,12 +312,9 @@ static int mini2440_devices_init(void) devfs_add_partition("nand0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env_raw"); dev_add_bb_dev("env_raw", "env0"); #endif - add_generic_device("s3c_mci", 0, NULL, S3C2410_SDI_BASE, 0, - IORESOURCE_MEM, &mci_data); - add_generic_device("s3c_fb", 0, NULL, S3C2410_LCD_BASE, 0, - IORESOURCE_MEM, &s3c24x0_fb_data); - add_generic_device("ohci", 0, NULL, S3C2410_USB_HOST_BASE, 0x100, - IORESOURCE_MEM, NULL); + s3c24xx_add_mci(&mci_data); + s3c24xx_add_fb(&s3c24x0_fb_data); + s3c24xx_add_ohci(); armlinux_set_bootparams((void*)S3C_SDRAM_BASE + 0x100); armlinux_set_architecture(MACH_TYPE_MINI2440); @@ -344,8 +341,7 @@ static int mini2440_console_init(void) s3c_gpio_mode(GPH2_TXD0); s3c_gpio_mode(GPH3_RXD0); - add_generic_device("s3c_serial", DEVICE_ID_DYNAMIC, NULL, S3C_UART1_BASE, - S3C_UART1_SIZE, IORESOURCE_MEM, NULL); + s3c24xx_add_uart1(); return 0; } diff --git a/arch/arm/mach-samsung/include/mach/devices-s3c24xx.h b/arch/arm/mach-samsung/include/mach/devices-s3c24xx.h new file mode 100644 index 0000000..51fd9a1 --- /dev/null +++ b/arch/arm/mach-samsung/include/mach/devices-s3c24xx.h @@ -0,0 +1,55 @@ +/* + * Copyright 2012 Juergen Beisert + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef INCLUDE_MACH_DEVICES_S3C24XX_H +# define INCLUDE_MACH_DEVICES_S3C24XX_H + +#include <driver.h> +#include <mach/s3c24xx-iomap.h> +#include <mach/s3c24xx-nand.h> +#include <mach/s3c-mci.h> +#include <mach/s3c24xx-fb.h> + +static inline void s3c24xx_add_nand(struct s3c24x0_nand_platform_data *d) +{ + add_generic_device("s3c24x0_nand", DEVICE_ID_DYNAMIC, NULL, + S3C24X0_NAND_BASE, 0x80, IORESOURCE_MEM, d); +} + +static inline void s3c24xx_add_mci(struct s3c_mci_platform_data *d) +{ + add_generic_device("s3c_mci", DEVICE_ID_DYNAMIC, NULL, + S3C2410_SDI_BASE, 0x80, IORESOURCE_MEM, d); +} + +static inline void s3c24xx_add_fb(struct s3c_fb_platform_data *d) +{ + add_generic_device("s3c_fb", DEVICE_ID_DYNAMIC, NULL, + S3C2410_LCD_BASE, 0x80, IORESOURCE_MEM, d); +} + +static inline void s3c24xx_add_ohci(void) +{ + add_generic_device("ohci", DEVICE_ID_DYNAMIC, NULL, + S3C2410_USB_HOST_BASE, 0x100, IORESOURCE_MEM, NULL); +} + +static inline void s3c24xx_add_uart1(void) +{ + add_generic_device("s3c_serial", DEVICE_ID_DYNAMIC, NULL, S3C_UART1_BASE, + S3C_UART1_SIZE, IORESOURCE_MEM, NULL); +} + +#endif /* INCLUDE_MACH_DEVICES_S3C24XX_H */ -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] NAND/Samsung: remove a leftover from architeture clean ups 2012-07-20 6:56 [PATCH/master] ARM/Samsung: A required fix and a cleanup Juergen Beisert 2012-07-20 6:56 ` [PATCH 1/3] ARM/Samsung: be able to include the nand header multiple times Juergen Beisert 2012-07-20 6:56 ` [PATCH 2/3] ARM/Samsung: unify device registration for the S3C24XX SoCs Juergen Beisert @ 2012-07-20 6:56 ` Juergen Beisert 2012-07-20 7:53 ` [PATCH/master] ARM/Samsung: A required fix and a cleanup Sascha Hauer 3 siblings, 0 replies; 5+ messages in thread From: Juergen Beisert @ 2012-07-20 6:56 UTC (permalink / raw) To: barebox Signed-off-by: Juergen Beisert <jbe@pengutronix.de> --- drivers/mtd/nand/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 4179618..1dcfb76 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -15,5 +15,4 @@ obj-$(CONFIG_NAND_IMX) += nand_imx.o obj-$(CONFIG_NAND_OMAP_GPMC) += nand_omap_gpmc.o nand_omap_bch_decoder.o obj-$(CONFIG_NAND_ATMEL) += atmel_nand.o obj-$(CONFIG_NAND_S3C24XX) += nand_s3c24xx.o -obj-$(CONFIG_NAND_S3C24X0) += nand_s3c2410.o obj-$(CONFIG_NAND_MXS) += nand_mxs.o -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH/master] ARM/Samsung: A required fix and a cleanup 2012-07-20 6:56 [PATCH/master] ARM/Samsung: A required fix and a cleanup Juergen Beisert ` (2 preceding siblings ...) 2012-07-20 6:56 ` [PATCH 3/3] NAND/Samsung: remove a leftover from architeture clean ups Juergen Beisert @ 2012-07-20 7:53 ` Sascha Hauer 3 siblings, 0 replies; 5+ messages in thread From: Sascha Hauer @ 2012-07-20 7:53 UTC (permalink / raw) To: Juergen Beisert; +Cc: barebox On Fri, Jul 20, 2012 at 08:56:14AM +0200, Juergen Beisert wrote: > Some fixes and cleanups for master related to boards based on the Samsung > S3C24XX CPU. > > The following changes since commit b78e5fe9f3ce155065831d3aa8a480656a8f53c5: > > commands/crc: assert newline after output with big offsets (2012-07-17 20:41:17 +0200) > > are available in the git repository at: > > git://git.pengutronix.de/git/jbe/barebox.git for_master_s3c24xx_runtime_fix_and_cleanup Pulled, thanks Sascha > > for you to fetch changes up to b47220d7f70df9191fc456dbcaeaa6ead72c6c02: > > NAND/Samsung: remove a leftover from architeture clean ups (2012-07-20 08:41:35 +0200) > > ---------------------------------------------------------------- > Juergen Beisert (3): > ARM/Samsung: be able to include the nand header multiple times > ARM/Samsung: unify device registration for the S3C24XX SoCs > NAND/Samsung: remove a leftover from architeture clean ups > > arch/arm/boards/a9m2410/a9m2410.c | 7 ++- > arch/arm/boards/a9m2440/a9m2440.c | 7 ++- > arch/arm/boards/mini2440/mini2440.c | 16 +++--- > .../mach-samsung/include/mach/devices-s3c24xx.h | 55 ++++++++++++++++++++ > arch/arm/mach-samsung/include/mach/s3c24xx-nand.h | 5 ++ > drivers/mtd/nand/Makefile | 1 - > 6 files changed, 72 insertions(+), 19 deletions(-) > create mode 100644 arch/arm/mach-samsung/include/mach/devices-s3c24xx.h > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-20 7:53 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-07-20 6:56 [PATCH/master] ARM/Samsung: A required fix and a cleanup Juergen Beisert 2012-07-20 6:56 ` [PATCH 1/3] ARM/Samsung: be able to include the nand header multiple times Juergen Beisert 2012-07-20 6:56 ` [PATCH 2/3] ARM/Samsung: unify device registration for the S3C24XX SoCs Juergen Beisert 2012-07-20 6:56 ` [PATCH 3/3] NAND/Samsung: remove a leftover from architeture clean ups Juergen Beisert 2012-07-20 7:53 ` [PATCH/master] ARM/Samsung: A required fix and a cleanup Sascha Hauer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox