9
0
Fork 0

Merge branch 'for-next/imx'

This commit is contained in:
Sascha Hauer 2013-04-04 12:03:20 +02:00
commit 71e001324b
6 changed files with 43 additions and 86 deletions

View File

@ -195,51 +195,10 @@ static const struct spi_board_info ccxmx51_spi_board_info[] = {
},
};
static void ccxmx51_otghost_init(void)
{
#define MX51_USBOTHER_REGS_OFFSET 0x800
#define MX51_USBCTRL_OFFSET 0x0
#define MX51_USB_PHY_CTR_FUNC_OFFSET 0x8
#define MX51_USB_PHY_CTR_FUNC2_OFFSET 0xc
#define MX51_USB_UTMI_PHYCTRL1_PLLDIV_MASK 0x3
#define MX51_USB_PLL_DIV_19_2_MHZ 0x00
#define MX51_USB_PLL_DIV_24_MHZ 0x01
#define MX51_USB_PLL_DIV_26_MHZ 0x02
#define MX51_USB_PLL_DIV_27_MHZ 0x03
#define MX51_OTG_PHYCTRL_OC_DIS_BIT (1 << 8)
#define MX51_OTG_UCTRL_OWIE_BIT (1 << 27)
#define MX51_OTG_UCTRL_OPM_BIT (1 << 24)
#define USBOTHER_BASE (MX51_OTG_BASE_ADDR + MX51_USBOTHER_REGS_OFFSET)
u32 reg;
/* Set sysclock to 24 MHz */
reg = readl(USBOTHER_BASE + MX51_USB_PHY_CTR_FUNC2_OFFSET);
reg &= ~MX51_USB_UTMI_PHYCTRL1_PLLDIV_MASK;
reg |= MX51_USB_PLL_DIV_24_MHZ;
writel(reg, USBOTHER_BASE + MX51_USB_PHY_CTR_FUNC2_OFFSET);
/* OC is not used */
reg = readl(USBOTHER_BASE + MX51_USB_PHY_CTR_FUNC_OFFSET);
reg |= MX51_OTG_PHYCTRL_OC_DIS_BIT;
writel(reg, USBOTHER_BASE + MX51_USB_PHY_CTR_FUNC_OFFSET);
/* Power pins enable */
reg = readl(USBOTHER_BASE + MX51_USBCTRL_OFFSET);
reg |= MX51_OTG_UCTRL_OWIE_BIT | MX51_OTG_UCTRL_OPM_BIT;
writel(reg, USBOTHER_BASE + MX51_USBCTRL_OFFSET);
/* Setup PORTSC */
reg = readl(MX51_OTG_BASE_ADDR + 0x184);
reg &= ~(3 << 30);
reg |= 1 << 28;
writel(reg, MX51_OTG_BASE_ADDR + 0x184);
mdelay(10);
add_generic_usb_ehci_device(0, MX51_OTG_BASE_ADDR, NULL);
}
static struct imxusb_platformdata ccxmx51_otg_pdata = {
.flags = MXC_EHCI_MODE_UTMI_16_BIT | MXC_EHCI_POWER_PINS_ENABLED,
.mode = IMX_USB_MODE_HOST,
};
static int ccxmx51_power_init(void)
{
@ -453,7 +412,7 @@ static int ccxmx51_devices_init(void)
add_generic_device("smc911x", 1, NULL, MX51_CS5_BASE_ADDR, SZ_4K, IORESOURCE_MEM, NULL);
}
ccxmx51_otghost_init();
imx51_add_usbotg(&ccxmx51_otg_pdata);
armlinux_set_bootparams((void *)(MX51_CSD0_BASE_ADDR + 0x100));

9
arch/arm/boards/ccxmx51/env/boot/nand vendored Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
if [ "$1" = menu ]; then
boot-menu-add-entry "$0" "NAND Flash"
exit
fi
global.bootm.image="/dev/kernel"
global.linux.bootargs.dyn.root="root=/dev/mtdblock3 ro"

View File

@ -1,37 +0,0 @@
#!/bin/sh
machine=ccmx51
# use 'dhcp' to do dhcp in barebox and in kernel
# use 'none' if you want to skip kernel ip autoconfiguration
ip=none
# or set your networking parameters here
#eth0.ipaddr=a.b.c.d
#eth0.netmask=a.b.c.d
#eth0.gateway=a.b.c.d
#eth0.serverip=a.b.c.d
# can be either 'nfs', 'tftp' or 'nand'
kernel_loc=nand
# can be either 'net', 'nand' or 'initrd'
rootfs_loc=nand
# rootfs
rootfs_type=cramfs
# kernel
kernelimage_type=zimage
kernel_img=/dev/nand0.kernel
autoboot_timeout=3
bootargs="console=ttymxc0,115200"
device_type="nand"
nand_device="mxc_nand"
nand_parts="512k(barebox)ro,256k(bareboxenv),3328k(kernel),-(root)"
rootfs_mtdblock_nand=3
# set a fancy prompt (if support is compiled in)
PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m "

View File

@ -0,0 +1,12 @@
#!/bin/sh
global.hostname=ccmx51
# Timeout in seconds before the default boot entry is started
global.autoboot_timeout=2
# Default boot entry (one of /env/boot/*)
global.boot.default=nand
# Board bootargs
global.linux.bootargs.base="earlyprintk console=ttymxc0,115200n8"

View File

@ -0,0 +1,11 @@
#!/bin/sh
if [ "$1" = menu ]; then
init-menu-add-entry "$0" "NAND partitions"
exit
fi
mtdparts="512k(barebox)ro,256k(bareboxenv),3328k(kernel),-(root)"
kernelname="mxc_nand"
mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}

View File

@ -7,13 +7,12 @@ CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
CONFIG_MMU=y
CONFIG_MALLOC_SIZE=0x2000000
CONFIG_LONGHELP=y
CONFIG_GLOB=y
CONFIG_HUSH_FANCY_PROMPT=y
CONFIG_CMDLINE_EDITING=y
CONFIG_AUTO_COMPLETE=y
CONFIG_DEFAULT_ENVIRONMENT_COMPRESSED_LZO=y
CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
CONFIG_DEFAULT_ENVIRONMENT_PATH="defaultenv arch/arm/boards/ccxmx51/env"
CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/ccxmx51/env"
CONFIG_CMD_EDIT=y
CONFIG_CMD_SLEEP=y
CONFIG_CMD_SAVEENV=y
@ -22,11 +21,15 @@ CONFIG_CMD_PRINTENV=y
CONFIG_CMD_READLINE=y
CONFIG_CMD_ECHO_E=y
CONFIG_CMD_MEMINFO=y
CONFIG_CMD_CRC=y
CONFIG_CMD_CRC_CMP=y
CONFIG_CMD_FLASH=y
CONFIG_CMD_BOOTM_SHOW_TYPE=y
CONFIG_CMD_BOOTZ=y
CONFIG_CMD_RESET=y
CONFIG_CMD_GO=y
CONFIG_CMD_OFTREE=y
CONFIG_CMD_OFTREE_PROBE=y
CONFIG_CMD_NANDTEST=y
CONFIG_CMD_MTEST=y
CONFIG_CMD_TIMEOUT=y