* [PATCH 2/7] ARM: pcm038: Fix serial number IIM-address
2013-02-24 9:23 [PATCH 1/7] ARM: pcm038: Select IIM by default Alexander Shiyan
@ 2013-02-24 9:23 ` Alexander Shiyan
2013-02-24 9:23 ` [PATCH 3/7] ARM: pcm970: Fix bug with CompactFlash Alexander Shiyan
` (5 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Alexander Shiyan @ 2013-02-24 9:23 UTC (permalink / raw)
To: barebox
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
arch/arm/boards/pcm038/pcm038.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index 5e9c0fd..f6de8f3 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -318,7 +318,7 @@ static int pcm038_devices_init(void)
pr_notice("Using environment in %s Flash\n", envdev);
- if (imx_iim_read(1, 1, &uid, 6) == 6)
+ if (imx_iim_read(1, 0, &uid, 6) == 6)
armlinux_set_serial(uid);
armlinux_set_bootparams((void *)0xa0000100);
armlinux_set_architecture(MACH_TYPE_PCM038);
--
1.7.12.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/7] ARM: pcm970: Fix bug with CompactFlash
2013-02-24 9:23 [PATCH 1/7] ARM: pcm038: Select IIM by default Alexander Shiyan
2013-02-24 9:23 ` [PATCH 2/7] ARM: pcm038: Fix serial number IIM-address Alexander Shiyan
@ 2013-02-24 9:23 ` Alexander Shiyan
2013-02-24 9:23 ` [PATCH 4/7] ARM: pcm970: Replace #ifdef with IS_ENABLED() Alexander Shiyan
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Alexander Shiyan @ 2013-02-24 9:23 UTC (permalink / raw)
To: barebox
Patch adds missing MX27_PCMCIA_CTL_BASE_ADDR offset for "readl" operator.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
arch/arm/boards/pcm038/pcm970.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/pcm038/pcm970.c b/arch/arm/boards/pcm038/pcm970.c
index a50a1f2..dd95f52 100644
--- a/arch/arm/boards/pcm038/pcm970.c
+++ b/arch/arm/boards/pcm038/pcm970.c
@@ -120,8 +120,8 @@ static void pcm970_ide_init(void)
writel(0x0000001f, MX27_PCMCIA_CTL_BASE_ADDR + MX27_PCMCIA_PGSR);
/* Make PCMCIA bank0 valid */
- writel(readl(MX27_PCMCIA_POR(0)) | (1 << 29),
- MX27_PCMCIA_CTL_BASE_ADDR + MX27_PCMCIA_POR(0));
+ i = readl(MX27_PCMCIA_CTL_BASE_ADDR + MX27_PCMCIA_POR(0));
+ writel(i | (1 << 29), MX27_PCMCIA_CTL_BASE_ADDR + MX27_PCMCIA_POR(0));
platform_device_register(&pcm970_ide_device);
}
--
1.7.12.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/7] ARM: pcm970: Replace #ifdef with IS_ENABLED()
2013-02-24 9:23 [PATCH 1/7] ARM: pcm038: Select IIM by default Alexander Shiyan
2013-02-24 9:23 ` [PATCH 2/7] ARM: pcm038: Fix serial number IIM-address Alexander Shiyan
2013-02-24 9:23 ` [PATCH 3/7] ARM: pcm970: Fix bug with CompactFlash Alexander Shiyan
@ 2013-02-24 9:23 ` Alexander Shiyan
2013-02-24 9:23 ` [PATCH 5/7] ARM: i.MX27: Use DEVICE_ID_SINGLE for IIM, CCM and ESDCTL Alexander Shiyan
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Alexander Shiyan @ 2013-02-24 9:23 UTC (permalink / raw)
To: barebox
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
arch/arm/boards/pcm038/pcm970.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boards/pcm038/pcm970.c b/arch/arm/boards/pcm038/pcm970.c
index dd95f52..b176d8d 100644
--- a/arch/arm/boards/pcm038/pcm970.c
+++ b/arch/arm/boards/pcm038/pcm970.c
@@ -27,7 +27,6 @@
#define GPIO_IDE_PCOE (GPIO_PORTF + 7)
#define GPIO_IDE_RESET (GPIO_PORTF + 10)
-#ifdef CONFIG_DISK_INTF_PLATFORM_IDE
static struct resource pcm970_ide_resources[] = {
{
.start = MX27_PCMCIA_MEM_BASE_ADDR,
@@ -125,7 +124,6 @@ static void pcm970_ide_init(void)
platform_device_register(&pcm970_ide_device);
}
-#endif
static void pcm970_mmc_init(void)
{
@@ -185,9 +183,8 @@ static int pcm970_init(void)
imx27_add_usbh2(&pcm970_usbh2_pdata);
}
-#ifdef CONFIG_DISK_INTF_PLATFORM_IDE
- pcm970_ide_init();
-#endif
+ if (IS_ENABLED(CONFIG_DISK_INTF_PLATFORM_IDE))
+ pcm970_ide_init();
if (IS_ENABLED(CONFIG_MCI_IMX))
pcm970_mmc_init();
--
1.7.12.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 5/7] ARM: i.MX27: Use DEVICE_ID_SINGLE for IIM, CCM and ESDCTL
2013-02-24 9:23 [PATCH 1/7] ARM: pcm038: Select IIM by default Alexander Shiyan
` (2 preceding siblings ...)
2013-02-24 9:23 ` [PATCH 4/7] ARM: pcm970: Replace #ifdef with IS_ENABLED() Alexander Shiyan
@ 2013-02-24 9:23 ` Alexander Shiyan
2013-02-24 9:23 ` [PATCH 6/7] ARM: pcm038: Using "get_ram_size" for determine SRAM size Alexander Shiyan
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Alexander Shiyan @ 2013-02-24 9:23 UTC (permalink / raw)
To: barebox
Only one of IIM, CCM or ESDCTL device is allowed, so use DEVICE_ID_SINGLE
for these devices.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
arch/arm/mach-imx/imx27.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/arm/mach-imx/imx27.c b/arch/arm/mach-imx/imx27.c
index 6d30276..e9d6197 100644
--- a/arch/arm/mach-imx/imx27.c
+++ b/arch/arm/mach-imx/imx27.c
@@ -103,12 +103,13 @@ static int imx27_init(void)
imx_iomuxv1_init((void *)MX27_GPIO1_BASE_ADDR);
- add_generic_device("imx_iim", 0, NULL, MX27_IIM_BASE_ADDR, SZ_4K,
- IORESOURCE_MEM, NULL);
+ add_generic_device("imx_iim", DEVICE_ID_SINGLE, NULL,
+ MX27_IIM_BASE_ADDR, SZ_4K, IORESOURCE_MEM, NULL);
imx27_init_max();
- add_generic_device("imx27-ccm", 0, NULL, MX27_CCM_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
+ add_generic_device("imx27-ccm", DEVICE_ID_SINGLE, NULL,
+ MX27_CCM_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
add_generic_device("imx1-gpt", 0, NULL, MX27_GPT1_BASE_ADDR, 0x100, IORESOURCE_MEM, NULL);
add_generic_device("imx1-gpio", 0, NULL, MX27_GPIO1_BASE_ADDR, 0x100, IORESOURCE_MEM, NULL);
add_generic_device("imx1-gpio", 1, NULL, MX27_GPIO2_BASE_ADDR, 0x100, IORESOURCE_MEM, NULL);
@@ -117,7 +118,8 @@ static int imx27_init(void)
add_generic_device("imx1-gpio", 4, NULL, MX27_GPIO5_BASE_ADDR, 0x100, IORESOURCE_MEM, NULL);
add_generic_device("imx1-gpio", 5, NULL, MX27_GPIO6_BASE_ADDR, 0x100, IORESOURCE_MEM, NULL);
add_generic_device("imx21-wdt", 0, NULL, MX27_WDOG_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
- add_generic_device("imx27-esdctl", 0, NULL, MX27_ESDCTL_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
+ add_generic_device("imx27-esdctl", DEVICE_ID_SINGLE, NULL,
+ MX27_ESDCTL_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
add_generic_device("imx27-usb-misc", 0, NULL, MX27_USB_OTG_BASE_ADDR + 0x600, 0x100, IORESOURCE_MEM, NULL);
return 0;
--
1.7.12.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 6/7] ARM: pcm038: Using "get_ram_size" for determine SRAM size
2013-02-24 9:23 [PATCH 1/7] ARM: pcm038: Select IIM by default Alexander Shiyan
` (3 preceding siblings ...)
2013-02-24 9:23 ` [PATCH 5/7] ARM: i.MX27: Use DEVICE_ID_SINGLE for IIM, CCM and ESDCTL Alexander Shiyan
@ 2013-02-24 9:23 ` Alexander Shiyan
2013-02-24 9:23 ` [PATCH 7/7] ARM: pcm038: Update defconfig Alexander Shiyan
2013-02-25 7:58 ` [PATCH 1/7] ARM: pcm038: Select IIM by default Sascha Hauer
6 siblings, 0 replies; 9+ messages in thread
From: Alexander Shiyan @ 2013-02-24 9:23 UTC (permalink / raw)
To: barebox
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
arch/arm/boards/pcm038/pcm038.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index f6de8f3..587ace8 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -21,6 +21,7 @@
#include <environment.h>
#include <mach/imx27-regs.h>
#include <fec.h>
+#include <sizes.h>
#include <notifier.h>
#include <mach/gpio.h>
#include <asm/armlinux.h>
@@ -186,6 +187,7 @@ static int pcm038_devices_init(void)
int i;
u64 uid = 0;
char *envdev;
+ long sram_size;
unsigned int mode[] = {
PD0_AIN_FEC_TXD0,
@@ -270,9 +272,11 @@ static int pcm038_devices_init(void)
/* configure SRAM on cs1 */
imx27_setup_weimcs(1, 0x0000d843, 0x22252521, 0x22220a00);
- /* Can be up to 2MiB */
- add_mem_device("ram1", 0xc8000000, 512 * 1024,
- IORESOURCE_MEM_WRITEABLE);
+ /* SRAM can be up to 2MiB */
+ sram_size = get_ram_size((ulong *)MX27_CS1_BASE_ADDR, SZ_2M);
+ if (sram_size)
+ add_mem_device("ram1", MX27_CS1_BASE_ADDR, sram_size,
+ IORESOURCE_MEM_WRITEABLE);
/* initizalize gpios */
for (i = 0; i < ARRAY_SIZE(mode); i++)
--
1.7.12.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 7/7] ARM: pcm038: Update defconfig
2013-02-24 9:23 [PATCH 1/7] ARM: pcm038: Select IIM by default Alexander Shiyan
` (4 preceding siblings ...)
2013-02-24 9:23 ` [PATCH 6/7] ARM: pcm038: Using "get_ram_size" for determine SRAM size Alexander Shiyan
@ 2013-02-24 9:23 ` Alexander Shiyan
2013-02-24 12:32 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-25 7:58 ` [PATCH 1/7] ARM: pcm038: Select IIM by default Sascha Hauer
6 siblings, 1 reply; 9+ messages in thread
From: Alexander Shiyan @ 2013-02-24 9:23 UTC (permalink / raw)
To: barebox
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
arch/arm/configs/pcm038_defconfig | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/configs/pcm038_defconfig b/arch/arm/configs/pcm038_defconfig
index e2f5388..aaaaf15 100644
--- a/arch/arm/configs/pcm038_defconfig
+++ b/arch/arm/configs/pcm038_defconfig
@@ -5,6 +5,7 @@ CONFIG_MACH_PCM038=y
CONFIG_AEABI=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_ARM_UNWIND=y
+CONFIG_PBL_IMAGE=y
CONFIG_MMU=y
CONFIG_TEXT_BASE=0xa7f00000
CONFIG_MALLOC_SIZE=0x1000000
@@ -48,6 +49,9 @@ CONFIG_CMD_MAGICVAR=y
CONFIG_CMD_MAGICVAR_HELP=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_SPI=y
+CONFIG_CMD_MIITOOL=y
+CONFIG_CMD_CLK=y
CONFIG_NET=y
CONFIG_NET_DHCP=y
CONFIG_NET_PING=y
@@ -56,6 +60,8 @@ CONFIG_NET_RESOLV=y
CONFIG_DRIVER_NET_FEC_IMX=y
CONFIG_NET_USB=y
CONFIG_NET_USB_ASIX=y
+CONFIG_I2C=y
+CONFIG_I2C_IMX=y
CONFIG_DRIVER_CFI=y
CONFIG_CFI_BUFFER_WRITE=y
CONFIG_MTD=y
@@ -73,5 +79,4 @@ CONFIG_DRIVER_VIDEO_IMX=y
CONFIG_IMXFB_DRIVER_VIDEO_IMX_OVERLAY=y
CONFIG_FS_TFTP=y
CONFIG_FS_NFS=y
-CONFIG_ZLIB=y
CONFIG_LZO_DECOMPRESS=y
--
1.7.12.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 7/7] ARM: pcm038: Update defconfig
2013-02-24 9:23 ` [PATCH 7/7] ARM: pcm038: Update defconfig Alexander Shiyan
@ 2013-02-24 12:32 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-02-24 12:32 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On 13:23 Sun 24 Feb , Alexander Shiyan wrote:
more info here
what you enable or disable at least
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
> arch/arm/configs/pcm038_defconfig | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/configs/pcm038_defconfig b/arch/arm/configs/pcm038_defconfig
> index e2f5388..aaaaf15 100644
> --- a/arch/arm/configs/pcm038_defconfig
> +++ b/arch/arm/configs/pcm038_defconfig
> @@ -5,6 +5,7 @@ CONFIG_MACH_PCM038=y
> CONFIG_AEABI=y
> CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
> CONFIG_ARM_UNWIND=y
> +CONFIG_PBL_IMAGE=y
> CONFIG_MMU=y
> CONFIG_TEXT_BASE=0xa7f00000
> CONFIG_MALLOC_SIZE=0x1000000
> @@ -48,6 +49,9 @@ CONFIG_CMD_MAGICVAR=y
> CONFIG_CMD_MAGICVAR_HELP=y
> CONFIG_CMD_GPIO=y
> CONFIG_CMD_UNCOMPRESS=y
> +CONFIG_CMD_SPI=y
> +CONFIG_CMD_MIITOOL=y
> +CONFIG_CMD_CLK=y
> CONFIG_NET=y
> CONFIG_NET_DHCP=y
> CONFIG_NET_PING=y
> @@ -56,6 +60,8 @@ CONFIG_NET_RESOLV=y
> CONFIG_DRIVER_NET_FEC_IMX=y
> CONFIG_NET_USB=y
> CONFIG_NET_USB_ASIX=y
> +CONFIG_I2C=y
> +CONFIG_I2C_IMX=y
> CONFIG_DRIVER_CFI=y
> CONFIG_CFI_BUFFER_WRITE=y
> CONFIG_MTD=y
> @@ -73,5 +79,4 @@ CONFIG_DRIVER_VIDEO_IMX=y
> CONFIG_IMXFB_DRIVER_VIDEO_IMX_OVERLAY=y
> CONFIG_FS_TFTP=y
> CONFIG_FS_NFS=y
> -CONFIG_ZLIB=y
> CONFIG_LZO_DECOMPRESS=y
> --
> 1.7.12.4
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/7] ARM: pcm038: Select IIM by default
2013-02-24 9:23 [PATCH 1/7] ARM: pcm038: Select IIM by default Alexander Shiyan
` (5 preceding siblings ...)
2013-02-24 9:23 ` [PATCH 7/7] ARM: pcm038: Update defconfig Alexander Shiyan
@ 2013-02-25 7:58 ` Sascha Hauer
6 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2013-02-25 7:58 UTC (permalink / raw)
To: Alexander Shiyan; +Cc: barebox
On Sun, Feb 24, 2013 at 01:23:53PM +0400, Alexander Shiyan wrote:
> PCM038 uses IIM in board code, so select IMX_IIM symbol by default.
>
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Applied 1-6,
Sascha
> ---
> arch/arm/mach-imx/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
> index 4115d35..c7c6a94 100644
> --- a/arch/arm/mach-imx/Kconfig
> +++ b/arch/arm/mach-imx/Kconfig
> @@ -289,6 +289,7 @@ config MACH_PCA100
>
> config MACH_PCM038
> bool "phyCORE-i.MX27"
> + select IMX_IIM
> select SPI
> select DRIVER_SPI_IMX
> select MFD_MC13XXX
> --
> 1.7.12.4
>
>
> _______________________________________________
> 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] 9+ messages in thread