* [PATCH v2 02/10] eukrea_cpuimx25: add display choice in environment
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
@ 2012-05-18 7:41 ` Eric Bénard
2012-05-18 7:41 ` [PATCH v2 03/10] eukrea_cpuimx35: " Eric Bénard
` (9 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:41 UTC (permalink / raw)
To: barebox
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
arch/arm/boards/eukrea_cpuimx25/env/config | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/arm/boards/eukrea_cpuimx25/env/config b/arch/arm/boards/eukrea_cpuimx25/env/config
index bc1cfd5..6b661fd 100644
--- a/arch/arm/boards/eukrea_cpuimx25/env/config
+++ b/arch/arm/boards/eukrea_cpuimx25/env/config
@@ -2,6 +2,8 @@
# otg port mode : can be 'host' or 'device'
otg_mode="device"
+# video : can be CMO-QVGA, URT-WVGA, DVI-VGA or DVI-SVGA
+video="CMO-QVGA"
machine=eukrea-cpuimx25
@@ -35,7 +37,7 @@ nfsroot="$eth0.serverip:/srv/nfs/$machine"
autoboot_timeout=1
-bootargs="console=ttymxc0,115200 otg_mode=$otg_mode"
+bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=imxfb:$video"
nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)"
rootfs_mtdblock_nand=3
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 03/10] eukrea_cpuimx35: add display choice in environment
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
2012-05-18 7:41 ` [PATCH v2 02/10] eukrea_cpuimx25: add display choice in environment Eric Bénard
@ 2012-05-18 7:41 ` Eric Bénard
2012-05-18 7:41 ` [PATCH v2 04/10] eukrea_cpuimx51: updated env Eric Bénard
` (8 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:41 UTC (permalink / raw)
To: barebox
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
arch/arm/boards/eukrea_cpuimx35/env/config | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/config b/arch/arm/boards/eukrea_cpuimx35/env/config
index 8f64ba0..df8677b 100644
--- a/arch/arm/boards/eukrea_cpuimx35/env/config
+++ b/arch/arm/boards/eukrea_cpuimx35/env/config
@@ -2,6 +2,8 @@
# otg port mode : can be 'host' or 'device'
otg_mode="device"
+# video : can be CMO-QVGA, URT-WVGA, DVI-VGA or DVI-SVGA
+video="CMO-QVGA"
machine=eukrea-cpuimx35
@@ -35,7 +37,7 @@ nfsroot="$eth0.serverip:/srv/nfs/$machine"
autoboot_timeout=1
-bootargs="console=ttymxc0,115200 otg_mode=$otg_mode"
+bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=mx3fb:$video"
nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)"
rootfs_mtdblock_nand=3
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 04/10] eukrea_cpuimx51: updated env
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
2012-05-18 7:41 ` [PATCH v2 02/10] eukrea_cpuimx25: add display choice in environment Eric Bénard
2012-05-18 7:41 ` [PATCH v2 03/10] eukrea_cpuimx35: " Eric Bénard
@ 2012-05-18 7:41 ` Eric Bénard
2012-05-18 7:41 ` [PATCH v2 05/10] eukrea_cpuimx25/35/51: update defconfig Eric Bénard
` (7 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:41 UTC (permalink / raw)
To: barebox
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
arch/arm/boards/eukrea_cpuimx51/env/config | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boards/eukrea_cpuimx51/env/config b/arch/arm/boards/eukrea_cpuimx51/env/config
index 1b57b29..3c5263e 100644
--- a/arch/arm/boards/eukrea_cpuimx51/env/config
+++ b/arch/arm/boards/eukrea_cpuimx51/env/config
@@ -2,9 +2,11 @@
# otg port mode : can be 'host' or 'device'
otg_mode="device"
-# video mode : can be 'CMO-QVGA' or any modefb mode
+# video mode : can be 'CMO-QVGA' or 'URT-WVGA' or any modefb mode
# ex : 640x480M-16@60 800x600M-24@60 1024x768M-16@60
video="CMO-QVGA"
+# screen type : can be 'tft' or 'dvi'
+screen_type="tft"
machine=eukrea-cpuimx51
@@ -38,12 +40,6 @@ nfsroot="$eth0.serverip:/srv/nfs/$machine"
autoboot_timeout=1
-if [ x$video = xCMO-QVGA ]; then
- screen_type="tft"
-else
- screen_type="dvi"
-fi
-
bootargs="console=ttymxc0,115200 otg_mode=$otg_mode video=$video screen_type=$screen_type"
nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)"
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 05/10] eukrea_cpuimx25/35/51: update defconfig
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
` (2 preceding siblings ...)
2012-05-18 7:41 ` [PATCH v2 04/10] eukrea_cpuimx51: updated env Eric Bénard
@ 2012-05-18 7:41 ` Eric Bénard
2012-05-18 7:41 ` [PATCH v2 06/10] eukrea_cpuimx25&35: use switch action to launch usbserial or dfu Eric Bénard
` (6 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:41 UTC (permalink / raw)
To: barebox
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
arch/arm/configs/eukrea_cpuimx25_defconfig | 17 +++++++++++++----
arch/arm/configs/eukrea_cpuimx35_defconfig | 19 +++++++++++++++----
arch/arm/configs/eukrea_cpuimx51_defconfig | 19 +++++++++++++++----
3 files changed, 43 insertions(+), 12 deletions(-)
diff --git a/arch/arm/configs/eukrea_cpuimx25_defconfig b/arch/arm/configs/eukrea_cpuimx25_defconfig
index 52fef55..94ae670 100644
--- a/arch/arm/configs/eukrea_cpuimx25_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx25_defconfig
@@ -5,7 +5,9 @@ CONFIG_IMX_IIM_FUSE_BLOW=y
CONFIG_AEABI=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
CONFIG_MALLOC_SIZE=0x800000
+CONFIG_EXPERIMENTAL=y
CONFIG_LONGHELP=y
CONFIG_GLOB=y
CONFIG_HUSH_FANCY_PROMPT=y
@@ -18,10 +20,10 @@ CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx25/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_LOADENV=y
CONFIG_CMD_EXPORT=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_READLINE=y
+CONFIG_CMD_AUTOMOUNT=y
CONFIG_CMD_ECHO_E=y
CONFIG_CMD_LOADB=y
CONFIG_CMD_MEMINFO=y
@@ -29,7 +31,10 @@ CONFIG_CMD_IOMEM=y
CONFIG_CMD_MTEST=y
CONFIG_CMD_FLASH=y
CONFIG_CMD_BOOTM_SHOW_TYPE=y
-CONFIG_CMD_IMINFO=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_CMD_OFTREE=y
@@ -45,19 +50,25 @@ CONFIG_CMD_LED=y
CONFIG_CMD_LED_TRIGGER=y
CONFIG_NET=y
CONFIG_NET_DHCP=y
+CONFIG_NET_NFS=y
CONFIG_NET_PING=y
CONFIG_NET_TFTP=y
CONFIG_NET_TFTP_PUSH=y
+CONFIG_NET_NETCONSOLE=y
CONFIG_DRIVER_NET_FEC_IMX=y
# CONFIG_SPI is not set
CONFIG_I2C=y
CONFIG_I2C_IMX=y
CONFIG_MTD=y
+CONFIG_MTD_RAW_DEVICE=y
CONFIG_NAND=y
CONFIG_NAND_IMX=y
CONFIG_USB=y
CONFIG_USB_EHCI=y
CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DFU=y
+CONFIG_USB_GADGET_SERIAL=y
CONFIG_VIDEO=y
CONFIG_DRIVER_VIDEO_IMX=y
CONFIG_MCI=y
@@ -65,9 +76,7 @@ CONFIG_MCI_IMX_ESDHC=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_LED_TRIGGERS=y
-CONFIG_FS_CRAMFS=y
CONFIG_FS_FAT=y
CONFIG_FS_FAT_WRITE=y
CONFIG_FS_FAT_LFN=y
-CONFIG_BZLIB=y
CONFIG_LZO_DECOMPRESS=y
diff --git a/arch/arm/configs/eukrea_cpuimx35_defconfig b/arch/arm/configs/eukrea_cpuimx35_defconfig
index b741b4f..a888765 100644
--- a/arch/arm/configs/eukrea_cpuimx35_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx35_defconfig
@@ -6,7 +6,9 @@ CONFIG_IMX_IIM_FUSE_BLOW=y
CONFIG_AEABI=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
CONFIG_MALLOC_SIZE=0x800000
+CONFIG_EXPERIMENTAL=y
CONFIG_LONGHELP=y
CONFIG_GLOB=y
CONFIG_HUSH_FANCY_PROMPT=y
@@ -19,10 +21,10 @@ CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx35/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_LOADENV=y
CONFIG_CMD_EXPORT=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_READLINE=y
+CONFIG_CMD_AUTOMOUNT=y
CONFIG_CMD_ECHO_E=y
CONFIG_CMD_LOADB=y
CONFIG_CMD_MEMINFO=y
@@ -30,7 +32,10 @@ CONFIG_CMD_IOMEM=y
CONFIG_CMD_MTEST=y
CONFIG_CMD_FLASH=y
CONFIG_CMD_BOOTM_SHOW_TYPE=y
-CONFIG_CMD_IMINFO=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_CMD_OFTREE=y
@@ -42,21 +47,29 @@ CONFIG_CMD_BMP=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_UNCOMPRESS=y
CONFIG_CMD_I2C=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
CONFIG_NET=y
CONFIG_NET_DHCP=y
+CONFIG_NET_NFS=y
CONFIG_NET_PING=y
CONFIG_NET_TFTP=y
CONFIG_NET_TFTP_PUSH=y
+CONFIG_NET_NETCONSOLE=y
CONFIG_DRIVER_NET_FEC_IMX=y
# CONFIG_SPI is not set
CONFIG_I2C=y
CONFIG_I2C_IMX=y
CONFIG_MTD=y
+CONFIG_MTD_RAW_DEVICE=y
CONFIG_NAND=y
CONFIG_NAND_IMX=y
CONFIG_USB=y
CONFIG_USB_EHCI=y
CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_DFU=y
+CONFIG_USB_GADGET_SERIAL=y
CONFIG_VIDEO=y
CONFIG_DRIVER_VIDEO_IMX_IPU=y
CONFIG_MCI=y
@@ -64,9 +77,7 @@ CONFIG_MCI_IMX_ESDHC=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_LED_TRIGGERS=y
-CONFIG_FS_CRAMFS=y
CONFIG_FS_FAT=y
CONFIG_FS_FAT_WRITE=y
CONFIG_FS_FAT_LFN=y
-CONFIG_BZLIB=y
CONFIG_LZO_DECOMPRESS=y
diff --git a/arch/arm/configs/eukrea_cpuimx51_defconfig b/arch/arm/configs/eukrea_cpuimx51_defconfig
index 76119cf..f6fd7bc 100644
--- a/arch/arm/configs/eukrea_cpuimx51_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx51_defconfig
@@ -4,7 +4,9 @@ CONFIG_MACH_EUKREA_CPUIMX51SD=y
CONFIG_AEABI=y
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_MMU=y
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0x40000
CONFIG_MALLOC_SIZE=0x2000000
+CONFIG_EXPERIMENTAL=y
CONFIG_LONGHELP=y
CONFIG_GLOB=y
CONFIG_HUSH_FANCY_PROMPT=y
@@ -15,7 +17,6 @@ CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx51/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
-CONFIG_CMD_LOADENV=y
CONFIG_CMD_EXPORT=y
CONFIG_CMD_PRINTENV=y
CONFIG_CMD_READLINE=y
@@ -23,10 +24,14 @@ CONFIG_CMD_ECHO_E=y
CONFIG_CMD_LOADB=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_IOMEM=y
+CONFIG_CMD_MD5SUM=y
CONFIG_CMD_MTEST=y
CONFIG_CMD_FLASH=y
CONFIG_CMD_BOOTM_SHOW_TYPE=y
-CONFIG_CMD_IMINFO=y
+CONFIG_CMD_BOOTM_VERBOSE=y
+CONFIG_CMD_BOOTM_INITRD=y
+CONFIG_CMD_BOOTM_OFTREE=y
+CONFIG_CMD_BOOTM_OFTREE_UIMAGE=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_CMD_OFTREE=y
@@ -36,10 +41,17 @@ CONFIG_CMD_MAGICVAR=y
CONFIG_CMD_MAGICVAR_HELP=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_UNCOMPRESS=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LED_TRIGGER=y
CONFIG_NET=y
CONFIG_NET_DHCP=y
+CONFIG_NET_NFS=y
CONFIG_NET_PING=y
CONFIG_NET_TFTP=y
+CONFIG_NET_TFTP_PUSH=y
+CONFIG_NET_NETCONSOLE=y
+CONFIG_NET_RESOLV=y
CONFIG_DRIVER_NET_FEC_IMX=y
# CONFIG_SPI is not set
CONFIG_I2C=y
@@ -53,9 +65,8 @@ CONFIG_MCI_IMX_ESDHC=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_LED_TRIGGERS=y
+CONFIG_FS_TFTP=y
CONFIG_FS_FAT=y
CONFIG_FS_FAT_WRITE=y
CONFIG_FS_FAT_LFN=y
-CONFIG_ZLIB=y
-CONFIG_BZLIB=y
CONFIG_LZO_DECOMPRESS=y
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 06/10] eukrea_cpuimx25&35: use switch action to launch usbserial or dfu
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
` (3 preceding siblings ...)
2012-05-18 7:41 ` [PATCH v2 05/10] eukrea_cpuimx25/35/51: update defconfig Eric Bénard
@ 2012-05-18 7:41 ` Eric Bénard
2012-05-18 7:41 ` [PATCH v2 07/10] iim: fix compilation when NET is not selected Eric Bénard
` (5 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:41 UTC (permalink / raw)
To: barebox
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
arch/arm/boards/eukrea_cpuimx25/env/bin/init_board | 21 ++++++++++++++++++++
arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c | 7 ++++++
arch/arm/boards/eukrea_cpuimx35/env/bin/init_board | 21 ++++++++++++++++++++
arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c | 10 +++++++-
4 files changed, 57 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board
index 2199b88..ff3365d 100644
--- a/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board
+++ b/arch/arm/boards/eukrea_cpuimx25/env/bin/init_board
@@ -9,6 +9,27 @@ elif [ -f /env/logo.bmp.lzo ]; then
fb0.enable=1
fi
+gpio_get_value 82
+if [ $? -eq 0 ]; then
+ gpio_set_value 83 0
+ usbserial
+ timeout -s -a 2
+ gpio_get_value 82
+ if [ $? -eq 0 ]; then
+ usbserial -d
+ dfu -V 0x1234 -P 0x1234 /dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r
+ gpio_get_value 82
+ if [ $? -eq 0 ]; then
+ usbserial
+ autoboot_timeout=60
+ else
+ reset
+ fi
+ else
+ autoboot_timeout=28
+ fi
+fi
+
if [ -z $eth0.ethaddr ]; then
while [ -z $eth0.ethaddr ]; do
readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr
diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index 75a99f7..07a8bc0 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -216,6 +216,8 @@ static struct pad_desc eukrea_cpuimx25_pads[] = {
MX25_PAD_SD1_DATA3__SD1_DATA3,
/* LED */
MX25_PAD_POWER_FAIL__GPIO_3_19,
+ /* SWITCH */
+ MX25_PAD_VSTBY_ACK__GPIO_3_18,
};
static int eukrea_cpuimx25_devices_init(void)
@@ -246,6 +248,9 @@ static int eukrea_cpuimx25_devices_init(void)
/* LED : default OFF */
gpio_direction_output(2 * 32 + 19, 1);
+ /* Switch : input */
+ gpio_direction_input(2 * 32 + 18);
+
imx25_add_fb(&eukrea_cpuimx25_fb_data);
imx25_add_i2c0(NULL);
@@ -255,10 +260,12 @@ static int eukrea_cpuimx25_devices_init(void)
imx25_usb_init();
add_generic_usb_ehci_device(-1, IMX_OTG_BASE + 0x400, NULL);
#endif
+#ifdef CONFIG_USB_GADGET
/* Workaround ENGcm09152 */
writel(readl(IMX_OTG_BASE + 0x608) | (1 << 23), IMX_OTG_BASE + 0x608);
add_generic_device("fsl-udc", -1, NULL, IMX_OTG_BASE, 0x200,
IORESOURCE_MEM, &usb_pdata);
+#endif
armlinux_set_bootparams((void *)0x80000100);
armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX25SD);
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board
index cb624e5..89fd9a9 100644
--- a/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board
+++ b/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board
@@ -11,6 +11,27 @@ elif [ -f /env/logo.bmp.lzo ]; then
gpio_set_value 1 1
fi
+gpio_get_value 89
+if [ $? -eq 0 ]; then
+ gpio_set_value 93 0
+ usbserial
+ timeout -s -a 2
+ gpio_get_value 89
+ if [ $? -eq 0 ]; then
+ usbserial -d
+ dfu -V 0x1234 -P 0x1234 /dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r
+ gpio_get_value 89
+ if [ $? -eq 0 ]; then
+ usbserial
+ autoboot_timeout=60
+ else
+ reset
+ fi
+ else
+ autoboot_timeout=28
+ fi
+fi
+
if [ -z $eth0.ethaddr ]; then
while [ -z $eth0.ethaddr ]; do
readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr
diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index 17da569..bfdd9de 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -161,6 +161,12 @@ static int eukrea_cpuimx35_devices_init(void)
imx35_add_i2c0(NULL);
imx35_add_mmc0(NULL);
+ /* led default off */
+ gpio_direction_output(32 * 2 + 29, 1);
+
+ /* Switch : input */
+ gpio_direction_input(32 * 2 + 25);
+
#ifdef CONFIG_USB
imx35_usb_init();
add_generic_usb_ehci_device(-1, IMX_OTG_BASE + 0x400, NULL);
@@ -220,6 +226,8 @@ static struct pad_desc eukrea_cpuimx35_pads[] = {
MX35_PAD_SD1_DATA1__ESDHC1_DAT1,
MX35_PAD_SD1_DATA2__ESDHC1_DAT2,
MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
+
+ MX35_PAD_LD19__GPIO3_25,
};
static int eukrea_cpuimx35_console_init(void)
@@ -231,8 +239,6 @@ static int eukrea_cpuimx35_console_init(void)
gpio_direction_output(4, 0);
/* backlight default off */
gpio_direction_output(1, 0);
- /* led default off */
- gpio_direction_output(32 * 2 + 29, 1);
imx35_add_uart0();
return 0;
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 07/10] iim: fix compilation when NET is not selected
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
` (4 preceding siblings ...)
2012-05-18 7:41 ` [PATCH v2 06/10] eukrea_cpuimx25&35: use switch action to launch usbserial or dfu Eric Bénard
@ 2012-05-18 7:41 ` Eric Bénard
2012-05-18 7:41 ` [PATCH v2 08/10] eukrea_cpuimx25: fix PHY address Eric Bénard
` (4 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:41 UTC (permalink / raw)
To: barebox
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
include/net.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/include/net.h b/include/net.h
index 3f2187e..eb087b2 100644
--- a/include/net.h
+++ b/include/net.h
@@ -64,8 +64,13 @@ void eth_halt(void); /* stop SCC */
* board code for boards which store their MAC address at some unusual
* place.
*/
+#if !defined(CONFIG_NET)
+static inline void eth_register_ethaddr(int ethid, const char *ethaddr)
+{
+}
+#else
void eth_register_ethaddr(int ethid, const char *ethaddr);
-
+#endif
/*
* Ethernet header
*/
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 08/10] eukrea_cpuimx25: fix PHY address
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
` (5 preceding siblings ...)
2012-05-18 7:41 ` [PATCH v2 07/10] iim: fix compilation when NET is not selected Eric Bénard
@ 2012-05-18 7:41 ` Eric Bénard
2012-05-18 7:41 ` [PATCH v2 09/10] eukrea_cpuimx35: fix PHY address and clean code Eric Bénard
` (3 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:41 UTC (permalink / raw)
To: barebox
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index 07a8bc0..a675da5 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -87,7 +87,7 @@ unsigned long __image_len_section barebox_len = DCD_BAREBOX_SIZE;
static struct fec_platform_data fec_info = {
.xcv_type = RMII,
- .phy_addr = 1,
+ .phy_addr = 0,
};
struct imx_nand_platform_data nand_info = {
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 09/10] eukrea_cpuimx35: fix PHY address and clean code
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
` (6 preceding siblings ...)
2012-05-18 7:41 ` [PATCH v2 08/10] eukrea_cpuimx25: fix PHY address Eric Bénard
@ 2012-05-18 7:41 ` Eric Bénard
2012-05-18 7:41 ` [PATCH v2 10/10] fec_imx: restart aneg at open and not at init Eric Bénard
` (2 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:41 UTC (permalink / raw)
To: barebox
this patch also cleans the source by putting in device_init
the code which is actually in console_init and has nothing
to see with the console.
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c | 90 ++++++++++----------
1 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index bfdd9de..cc8c60d 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -58,7 +58,7 @@
static struct fec_platform_data fec_info = {
.xcv_type = MII100,
- .phy_addr = 0x1F,
+ .phy_addr = 0,
};
struct imx_nand_platform_data nand_info = {
@@ -143,49 +143,6 @@ static int eukrea_cpuimx35_mmu_init(void)
}
postmmu_initcall(eukrea_cpuimx35_mmu_init);
-static int eukrea_cpuimx35_devices_init(void)
-{
-#ifdef CONFIG_USB_GADGET
- unsigned int tmp;
-#endif
- imx35_add_nand(&nand_info);
-
- devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, "self_raw");
- dev_add_bb_dev("self_raw", "self0");
- devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw");
- dev_add_bb_dev("env_raw", "env0");
-
- imx35_add_fec(&fec_info);
- imx35_add_fb(&ipu_fb_data);
-
- imx35_add_i2c0(NULL);
- imx35_add_mmc0(NULL);
-
- /* led default off */
- gpio_direction_output(32 * 2 + 29, 1);
-
- /* Switch : input */
- gpio_direction_input(32 * 2 + 25);
-
-#ifdef CONFIG_USB
- imx35_usb_init();
- add_generic_usb_ehci_device(-1, IMX_OTG_BASE + 0x400, NULL);
-#endif
-#ifdef CONFIG_USB_GADGET
- /* Workaround ENGcm09152 */
- tmp = readl(IMX_OTG_BASE + 0x608);
- writel(tmp | (1 << 23), IMX_OTG_BASE + 0x608);
- add_generic_device("fsl-udc", -1, NULL, IMX_OTG_BASE, 0x200,
- IORESOURCE_MEM, &usb_pdata);
-#endif
- armlinux_set_bootparams((void *)0x80000100);
- armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX35SD);
-
- return 0;
-}
-
-device_initcall(eukrea_cpuimx35_devices_init);
-
static struct pad_desc eukrea_cpuimx35_pads[] = {
MX35_PAD_FEC_TX_CLK__FEC_TX_CLK,
MX35_PAD_FEC_RX_CLK__FEC_RX_CLK,
@@ -230,16 +187,59 @@ static struct pad_desc eukrea_cpuimx35_pads[] = {
MX35_PAD_LD19__GPIO3_25,
};
-static int eukrea_cpuimx35_console_init(void)
+static int eukrea_cpuimx35_devices_init(void)
{
+#ifdef CONFIG_USB_GADGET
+ unsigned int tmp;
+#endif
mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads,
ARRAY_SIZE(eukrea_cpuimx35_pads));
+ imx35_add_nand(&nand_info);
+
+ devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, "self_raw");
+ dev_add_bb_dev("self_raw", "self0");
+ devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw");
+ dev_add_bb_dev("env_raw", "env0");
+
+ imx35_add_fec(&fec_info);
+ imx35_add_fb(&ipu_fb_data);
+
+ imx35_add_i2c0(NULL);
+ imx35_add_mmc0(NULL);
+
+ /* led default off */
+ gpio_direction_output(32 * 2 + 29, 1);
+
+ /* Switch : input */
+ gpio_direction_input(32 * 2 + 25);
+
/* screen default on to prevent flicker */
gpio_direction_output(4, 0);
/* backlight default off */
gpio_direction_output(1, 0);
+#ifdef CONFIG_USB
+ imx35_usb_init();
+ add_generic_usb_ehci_device(-1, IMX_OTG_BASE + 0x400, NULL);
+#endif
+#ifdef CONFIG_USB_GADGET
+ /* Workaround ENGcm09152 */
+ tmp = readl(IMX_OTG_BASE + 0x608);
+ writel(tmp | (1 << 23), IMX_OTG_BASE + 0x608);
+ add_generic_device("fsl-udc", -1, NULL, IMX_OTG_BASE, 0x200,
+ IORESOURCE_MEM, &usb_pdata);
+#endif
+ armlinux_set_bootparams((void *)0x80000100);
+ armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX35SD);
+
+ return 0;
+}
+
+device_initcall(eukrea_cpuimx35_devices_init);
+
+static int eukrea_cpuimx35_console_init(void)
+{
imx35_add_uart0();
return 0;
}
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 10/10] fec_imx: restart aneg at open and not at init
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
` (7 preceding siblings ...)
2012-05-18 7:41 ` [PATCH v2 09/10] eukrea_cpuimx35: fix PHY address and clean code Eric Bénard
@ 2012-05-18 7:41 ` Eric Bénard
2012-05-18 7:52 ` [PATCH v2 xx/10] Eric Bénard
2012-05-18 9:43 ` [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Sascha Hauer
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:41 UTC (permalink / raw)
To: barebox
else we can get a 1 second timeout at each boot since
"6cbecc4 net: miidev: properly check for MII reset"
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
drivers/net/fec_imx.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c
index 08cd761..eb0ca44 100644
--- a/drivers/net/fec_imx.c
+++ b/drivers/net/fec_imx.c
@@ -335,9 +335,6 @@ static int fec_init(struct eth_device *dev)
/* size of each buffer */
writel(FEC_MAX_PKT_SIZE, fec->regs + FEC_EMRBR);
- if (fec->xcv_type != SEVENWIRE)
- miidev_restart_aneg(&fec->miidev);
-
return 0;
}
@@ -350,6 +347,9 @@ static int fec_open(struct eth_device *edev)
struct fec_priv *fec = (struct fec_priv *)edev->priv;
int ret;
+ if (fec->xcv_type != SEVENWIRE)
+ miidev_restart_aneg(&fec->miidev);
+
/*
* Initialize RxBD/TxBD rings
*/
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 xx/10]
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
` (8 preceding siblings ...)
2012-05-18 7:41 ` [PATCH v2 10/10] fec_imx: restart aneg at open and not at init Eric Bénard
@ 2012-05-18 7:52 ` Eric Bénard
2012-05-18 9:43 ` [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Sascha Hauer
10 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 7:52 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi Sascha,
in this v2 :
- squashed defconfig in one patch
- squashed init_board updates to use dfu & usbserial in one patch
- added a static inline void eth_register_ethaddr in net.h to solve iim
compilation when NET is not selected
- moved the patch moving restart_aneg in fec_imx as patch 10/10 : you
can drop it if you don't want it
Thanks,
Eric
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152
2012-05-18 7:41 [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Eric Bénard
` (9 preceding siblings ...)
2012-05-18 7:52 ` [PATCH v2 xx/10] Eric Bénard
@ 2012-05-18 9:43 ` Sascha Hauer
2012-05-18 9:58 ` Eric Bénard
10 siblings, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2012-05-18 9:43 UTC (permalink / raw)
To: Eric Bénard; +Cc: barebox
Hi Eric,
On Fri, May 18, 2012 at 09:41:36AM +0200, Eric Bénard wrote:
> else USB device doesn't work as the hardware fix is present on the
> boards
>
> Signed-off-by: Eric Bénard <eric@eukrea.com>
Applied this series. I had to apply several patches manually, please
check if all went right (and please try and apply your own patches you
received from the list and see what might have gone wrong to fix it next
time)
Sascha
> ---
> arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
> index 1e48650..75a99f7 100644
> --- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
> +++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
> @@ -255,6 +255,8 @@ static int eukrea_cpuimx25_devices_init(void)
> imx25_usb_init();
> add_generic_usb_ehci_device(-1, IMX_OTG_BASE + 0x400, NULL);
> #endif
> + /* Workaround ENGcm09152 */
> + writel(readl(IMX_OTG_BASE + 0x608) | (1 << 23), IMX_OTG_BASE + 0x608);
> add_generic_device("fsl-udc", -1, NULL, IMX_OTG_BASE, 0x200,
> IORESOURCE_MEM, &usb_pdata);
>
> --
> 1.7.7.6
>
>
> _______________________________________________
> 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] 13+ messages in thread
* Re: [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152
2012-05-18 9:43 ` [PATCH v2 01/10] eukrea_cpuimx25: workaround ENGcm09152 Sascha Hauer
@ 2012-05-18 9:58 ` Eric Bénard
0 siblings, 0 replies; 13+ messages in thread
From: Eric Bénard @ 2012-05-18 9:58 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
Hi Sascha,
Le Fri, 18 May 2012 11:43:34 +0200,
Sascha Hauer <s.hauer@pengutronix.de> a écrit :
> On Fri, May 18, 2012 at 09:41:36AM +0200, Eric Bénard wrote:
> > else USB device doesn't work as the hardware fix is present on the
> > boards
> >
> > Signed-off-by: Eric Bénard <eric@eukrea.com>
>
> Applied this series. I had to apply several patches manually, please
> check if all went right (and please try and apply your own patches you
> received from the list and see what might have gone wrong to fix it next
> time)
>
sorry for this I generated the patches against 2012.05.0 checked in a
branch, not against master.
Eric
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 13+ messages in thread