summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-09-21 00:26:19 +0200
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2012-09-21 00:26:19 +0200
commitd193c1b6eb05041c94ad9aacd8c94189d1dbc5f8 (patch)
treec08012d3c427142364bca40e042659b3a819c60a /board
parent651eb7322407173d5f1ac5a149e381a4044858f4 (diff)
parent1d9b033269263a69f7402f508c17b242fc7fea43 (diff)
downloadu-boot-imx-d193c1b6eb05041c94ad9aacd8c94189d1dbc5f8.zip
u-boot-imx-d193c1b6eb05041c94ad9aacd8c94189d1dbc5f8.tar.gz
u-boot-imx-d193c1b6eb05041c94ad9aacd8c94189d1dbc5f8.tar.bz2
Merge remote-tracking branch 'u-boot-imx/master'
Diffstat (limited to 'board')
-rw-r--r--board/freescale/mx28evk/iomux.c2
-rw-r--r--board/freescale/mx28evk/mx28evk.c4
-rw-r--r--board/freescale/mx35pdk/README78
-rw-r--r--board/freescale/mx35pdk/mx35pdk.c25
-rw-r--r--board/freescale/mx6qsabrelite/mx6qsabrelite.c24
-rw-r--r--board/genesi/mx51_efikamx/Makefile6
-rw-r--r--board/genesi/mx51_efikamx/efikamx-usb.c12
-rw-r--r--board/genesi/mx51_efikamx/efikamx.c3
8 files changed, 55 insertions, 99 deletions
diff --git a/board/freescale/mx28evk/iomux.c b/board/freescale/mx28evk/iomux.c
index 16a6d8a..ae6eda3 100644
--- a/board/freescale/mx28evk/iomux.c
+++ b/board/freescale/mx28evk/iomux.c
@@ -173,7 +173,7 @@ const iomux_cfg_t iomux_setup[] = {
#define HW_DRAM_CTL29_CONFIG (CS_MAP << 24 | COLUMN_SIZE << 16 | \
ADDR_PINS << 8 | APREBIT)
-void mx28_adjust_memory_params(uint32_t *dram_vals)
+void mxs_adjust_memory_params(uint32_t *dram_vals)
{
dram_vals[HW_DRAM_CTL29] = HW_DRAM_CTL29_CONFIG;
}
diff --git a/board/freescale/mx28evk/mx28evk.c b/board/freescale/mx28evk/mx28evk.c
index 867d3c8..d782aea 100644
--- a/board/freescale/mx28evk/mx28evk.c
+++ b/board/freescale/mx28evk/mx28evk.c
@@ -49,8 +49,8 @@ int board_early_init_f(void)
/* SSP0 clock at 96MHz */
mx28_set_sspclk(MXC_SSPCLK0, 96000, 0);
- /* SSP2 clock at 96MHz */
- mx28_set_sspclk(MXC_SSPCLK2, 96000, 0);
+ /* SSP2 clock at 160MHz */
+ mx28_set_sspclk(MXC_SSPCLK2, 160000, 0);
#ifdef CONFIG_CMD_USB
mxs_iomux_setup_pad(MX28_PAD_SSP2_SS1__USB1_OVERCURRENT);
diff --git a/board/freescale/mx35pdk/README b/board/freescale/mx35pdk/README
index 3d69ed5..7232b53 100644
--- a/board/freescale/mx35pdk/README
+++ b/board/freescale/mx35pdk/README
@@ -71,91 +71,17 @@ exec -c "noinitrd console=ttymxc0,115200 root=/dev/nfsroot rootfstype=nfsroot nf
Flashing U-Boot
--------------------------------
-There are two options: the original bootloader in NAND can be replaced with
-u-boot, or u-boot can be stored on the NOR flash without erasing
-the delivered bootloader.
+U-boot should be stored on the NOR flash.
+
The boot storage can be select using the switches on the personality board
(SW1-SW2) and on the DEBUG board (SW4-SW10).
-The second option is to be preferred if you have not a JTAG debugger.
If something goes wrong flashing the bootloader, it is always possible to
recover the board booting from the other device.
-Replacing the bootloader on the NAND
---------------------------------------
-To replace RedBoot with U-Boot, the easy way is to do this in linux.
-Start the kernel with the suggested options. Make sure to have set the
-mtdparts exactly as described, because this matches the layout on the
-mx35pdk.
-
-You should see in your boot log the following entries for the NAND
-flash:
-
-5 cmdlinepart partitions found on MTD device mxc_nand
-Creating 5 MTD partitions on "mxc_nand":
-0x000000000000-0x000000100000 : "boot"
-0x000000100000-0x000000600000 : "linux"
-0x000000600000-0x000006600000 : "root"
-0x000006600000-0x000006e00000 : "cfg"
-0x000006e00000-0x000080000000 : "user"
-
-You can use the utilities flash_eraseall and nandwrite to put
-u-boot on the NAND. The bootloader is marked as "boot", and 1MB is
-reserved. If everything is correct, this partition is accessed as
-/dev/mtd4. However, check if it is correct with "cat /proc/mtd" and
-get the device node from the partition name:
-
-$ cat /proc/mtd | grep boot
-
-I suggest you try the utilities on a different partition to be sure
-if everything works correctly. If not, and you remove RedBoot, you have to
-reinstall it using the ATK tool as suggested by Freescale, or using a
-JTAG debugger.
-
-I report the versions of the utilities I used (they are provided with ELDK):
-
--bash-3.2# nandwrite --version
-nandwrite $Revision: 1.32 $
-
-flash_eraseall --version
-flash_eraseall $Revision: 1.22 $
-
-nandwrite reports a warning if the file to be saved is not sector aligned.
-This should have no consequences, but I preferred to pad u-boot.bin
-to get no problem at all.
-$ dd if=/dev/zero of=zeros bs=1 count=74800
-$ cat u-boot.bin zeros > u-boot-padded.bin
-
-To erase the partition:
-$ flash_eraseall /dev/mtd4
-
-Writing u-boot:
-
-$ nandwrite /dev/mtd4 u-boot-padded.bin
-
-Now U-Boot is stored on the booting partition.
-
-To boot from NAND, you have to select the switches as follows:
-
-Personality board
- SW2 1, 4, 5 on
- 2, 3, 6, 7, 8 off
- SW1 all off
-
-Debug Board:
- SW5 0
- SW6 0
- SW7 0
- SW8 1
- SW9 1
- SW10 0
-
-
Saving U-Boot in the NOR flash
---------------------------------
-The procedure to save in the NOR flash is quite the same as to write into the NAND.
-
Check the partition for boot in the NOR flash. Setting the mtdparts as reported,
the boot partition should be /dev/mtd0.
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index 787c923..7cb6b30 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -32,6 +32,8 @@
#include <i2c.h>
#include <pmic.h>
#include <fsl_pmic.h>
+#include <mmc.h>
+#include <fsl_esdhc.h>
#include <mc9sdz60.h>
#include <mc13892.h>
#include <linux/types.h>
@@ -275,3 +277,26 @@ int board_eth_init(bd_t *bis)
return rc;
}
+
+#if defined(CONFIG_FSL_ESDHC)
+
+struct fsl_esdhc_cfg esdhc_cfg = {MMC_SDHC1_BASE_ADDR};
+
+int board_mmc_init(bd_t *bis)
+{
+ /* configure pins for SDHC1 only */
+ mxc_request_iomux(MX35_PIN_SD1_CMD, MUX_CONFIG_FUNC);
+ mxc_request_iomux(MX35_PIN_SD1_CLK, MUX_CONFIG_FUNC);
+ mxc_request_iomux(MX35_PIN_SD1_DATA0, MUX_CONFIG_FUNC);
+ mxc_request_iomux(MX35_PIN_SD1_DATA1, MUX_CONFIG_FUNC);
+ mxc_request_iomux(MX35_PIN_SD1_DATA2, MUX_CONFIG_FUNC);
+ mxc_request_iomux(MX35_PIN_SD1_DATA3, MUX_CONFIG_FUNC);
+
+ return fsl_esdhc_initialize(bis, &esdhc_cfg);
+}
+
+int board_mmc_getcd(struct mmc *mmc)
+{
+ return !(mc9sdz60_reg_read(MC9SDZ60_REG_DES_FLAG) & 0x4);
+}
+#endif
diff --git a/board/freescale/mx6qsabrelite/mx6qsabrelite.c b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
index 909ccca..4b4e89b 100644
--- a/board/freescale/mx6qsabrelite/mx6qsabrelite.c
+++ b/board/freescale/mx6qsabrelite/mx6qsabrelite.c
@@ -197,18 +197,18 @@ static iomux_v3_cfg_t button_pads[] = {
static void setup_iomux_enet(void)
{
- gpio_direction_output(87, 0); /* GPIO 3-23 */
- gpio_direction_output(190, 1); /* GPIO 6-30 */
- gpio_direction_output(185, 1); /* GPIO 6-25 */
- gpio_direction_output(187, 1); /* GPIO 6-27 */
- gpio_direction_output(188, 1); /* GPIO 6-28*/
- gpio_direction_output(189, 1); /* GPIO 6-29 */
+ gpio_direction_output(IMX_GPIO_NR(3, 23), 0);
+ gpio_direction_output(IMX_GPIO_NR(6, 30), 1);
+ gpio_direction_output(IMX_GPIO_NR(6, 25), 1);
+ gpio_direction_output(IMX_GPIO_NR(6, 27), 1);
+ gpio_direction_output(IMX_GPIO_NR(6, 28), 1);
+ gpio_direction_output(IMX_GPIO_NR(6, 29), 1);
imx_iomux_v3_setup_multiple_pads(enet_pads1, ARRAY_SIZE(enet_pads1));
- gpio_direction_output(184, 1); /* GPIO 6-24 */
+ gpio_direction_output(IMX_GPIO_NR(6, 24), 1);
/* Need delay 10ms according to KSZ9021 spec */
udelay(1000 * 10);
- gpio_set_value(87, 1); /* GPIO 3-23 */
+ gpio_set_value(IMX_GPIO_NR(3, 23), 1);
imx_iomux_v3_setup_multiple_pads(enet_pads2, ARRAY_SIZE(enet_pads2));
}
@@ -249,11 +249,11 @@ int board_mmc_getcd(struct mmc *mmc)
int ret;
if (cfg->esdhc_base == USDHC3_BASE_ADDR) {
- gpio_direction_input(192); /*GPIO7_0*/
- ret = !gpio_get_value(192);
+ gpio_direction_input(IMX_GPIO_NR(7, 0));
+ ret = !gpio_get_value(IMX_GPIO_NR(7, 0));
} else {
- gpio_direction_input(38); /*GPIO2_6*/
- ret = !gpio_get_value(38);
+ gpio_direction_input(IMX_GPIO_NR(2, 6));
+ ret = !gpio_get_value(IMX_GPIO_NR(2, 6));
}
return ret;
diff --git a/board/genesi/mx51_efikamx/Makefile b/board/genesi/mx51_efikamx/Makefile
index bd2174f..f95356f 100644
--- a/board/genesi/mx51_efikamx/Makefile
+++ b/board/genesi/mx51_efikamx/Makefile
@@ -27,11 +27,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).o
-COBJS := efikamx.o
-
-ifdef CONFIG_CMD_USB
-COBJS += efikamx-usb.o
-endif
+COBJS := efikamx.o efikamx-usb.o
SRCS := $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
diff --git a/board/genesi/mx51_efikamx/efikamx-usb.c b/board/genesi/mx51_efikamx/efikamx-usb.c
index e9273d0..cf020c3 100644
--- a/board/genesi/mx51_efikamx/efikamx-usb.c
+++ b/board/genesi/mx51_efikamx/efikamx-usb.c
@@ -214,3 +214,15 @@ void board_ehci_hcd_postinit(struct usb_ehci *ehci, int port)
if (port)
mdelay(10);
}
+
+/*
+ * Ethernet on the Smarttop is on the USB bus. Rather than give an error about
+ * "CPU Net Initialization Failed", just pass this test since no other settings
+ * are required. Smartbook doesn't have built-in Ethernet but we will let it
+ * pass anyway considering someone may have plugged in a USB stick and all
+ * they need to do is run "usb start".
+ */
+int board_eth_init(bd_t *bis)
+{
+ return 0;
+}
diff --git a/board/genesi/mx51_efikamx/efikamx.c b/board/genesi/mx51_efikamx/efikamx.c
index 6d98c94..cfd2e93 100644
--- a/board/genesi/mx51_efikamx/efikamx.c
+++ b/board/genesi/mx51_efikamx/efikamx.c
@@ -492,9 +492,6 @@ int board_late_init(void)
ARRAY_SIZE(efikamx_pata_pads));
setup_iomux_usb();
- if (machine_is_efikasb())
- setenv("preboot", "usb reset ; setenv stdin usbkbd\0");
-
return 0;
}