Merge branch 'for-next/misc'
This commit is contained in:
commit
6e4b15537b
|
@ -65,3 +65,4 @@ cscope.*
|
|||
*.patch
|
||||
scripts/gen_netx_image
|
||||
scripts/s5p_cksum
|
||||
scripts/bareboxenv-target
|
||||
|
|
3
Makefile
3
Makefile
|
@ -540,7 +540,7 @@ quiet_cmd_check_file_size = CHKSIZE $@
|
|||
max_size=`printf "%d" $2`; \
|
||||
if [ $$size -gt $$max_size ] ; \
|
||||
then \
|
||||
echo "$@ size $$size > of the maximum size $$max_size"; \
|
||||
echo "$@ size $$size > of the maximum size $$max_size" >&2; \
|
||||
exit 1 ; \
|
||||
fi;
|
||||
|
||||
|
@ -1003,6 +1003,7 @@ CLEAN_DIRS += $(MODVERDIR)
|
|||
CLEAN_FILES += barebox System.map include/generated/barebox_default_env.h \
|
||||
.tmp_version .tmp_barebox* barebox.bin barebox.map barebox.S \
|
||||
.tmp_kallsyms* barebox_default_env* barebox.ldr \
|
||||
scripts/bareboxenv-target \
|
||||
Doxyfile.version barebox.srec barebox.s5p
|
||||
|
||||
# Directories & files removed with 'make mrproper'
|
||||
|
|
|
@ -53,6 +53,11 @@ struct imx_nand_platform_data nand_info = {
|
|||
};
|
||||
|
||||
static iomux_v3_cfg_t eukrea_cpuimx51_pads[] = {
|
||||
/* UART1 */
|
||||
MX51_PAD_UART1_RXD__UART1_RXD,
|
||||
MX51_PAD_UART1_TXD__UART1_TXD,
|
||||
MX51_PAD_UART1_RTS__UART1_RTS,
|
||||
MX51_PAD_UART1_CTS__UART1_CTS,
|
||||
/* FEC */
|
||||
MX51_PAD_DISP2_DAT1__FEC_RX_ER,
|
||||
MX51_PAD_DISP2_DAT15__FEC_TDATA0,
|
||||
|
@ -141,12 +146,8 @@ static int eukrea_cpuimx51_console_init(void)
|
|||
|
||||
imx51_init_lowlevel(800);
|
||||
|
||||
writel(0, 0x73fa8228);
|
||||
writel(0, 0x73fa822c);
|
||||
writel(0, 0x73fa8230);
|
||||
writel(0, 0x73fa8234);
|
||||
|
||||
imx51_add_uart0();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,12 @@ static struct fec_platform_data fec_info = {
|
|||
};
|
||||
|
||||
static iomux_v3_cfg_t f3s_pads[] = {
|
||||
/* UART1 */
|
||||
MX51_PAD_UART1_RXD__UART1_RXD,
|
||||
MX51_PAD_UART1_TXD__UART1_TXD,
|
||||
MX51_PAD_UART1_RTS__UART1_RTS,
|
||||
MX51_PAD_UART1_CTS__UART1_CTS,
|
||||
/* FEC */
|
||||
MX51_PAD_EIM_EB2__FEC_MDIO,
|
||||
MX51_PAD_EIM_EB3__FEC_RDATA1,
|
||||
MX51_PAD_EIM_CS2__FEC_RDATA2,
|
||||
|
@ -246,6 +252,7 @@ static int f3s_devices_init(void)
|
|||
imx51_iim_register_fec_ethaddr();
|
||||
imx51_add_fec(&fec_info);
|
||||
imx51_add_mmc0(NULL);
|
||||
imx51_add_mmc1(NULL);
|
||||
|
||||
armlinux_set_bootparams((void *)0x90000100);
|
||||
armlinux_set_architecture(MACH_TYPE_MX51_BABBAGE);
|
||||
|
@ -268,12 +275,8 @@ static int f3s_console_init(void)
|
|||
{
|
||||
mxc_iomux_v3_setup_multiple_pads(f3s_pads, ARRAY_SIZE(f3s_pads));
|
||||
|
||||
writel(0, 0x73fa8228);
|
||||
writel(0, 0x73fa822c);
|
||||
writel(0, 0x73fa8230);
|
||||
writel(0, 0x73fa8234);
|
||||
|
||||
imx51_add_uart0();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,10 @@ config CMD_SLEEP
|
|||
tristate
|
||||
prompt "sleep"
|
||||
|
||||
config CMD_MSLEEP
|
||||
tristate
|
||||
prompt "msleep"
|
||||
|
||||
config CMD_SAVEENV
|
||||
tristate
|
||||
select ENV_HANDLING
|
||||
|
|
|
@ -10,6 +10,7 @@ obj-$(CONFIG_CMD_MTEST) += memtest.o
|
|||
obj-$(CONFIG_CMD_EDIT) += edit.o
|
||||
obj-$(CONFIG_CMD_EXEC) += exec.o
|
||||
obj-$(CONFIG_CMD_SLEEP) += sleep.o
|
||||
obj-$(CONFIG_CMD_MSLEEP) += msleep.o
|
||||
obj-$(CONFIG_CMD_RESET) += reset.o
|
||||
obj-$(CONFIG_CMD_GO) += go.o
|
||||
obj-$(CONFIG_NET) += net.o
|
||||
|
|
|
@ -92,5 +92,5 @@ BAREBOX_CMD_START(go)
|
|||
.cmd = do_go,
|
||||
.usage = "start application at address or file",
|
||||
BAREBOX_CMD_HELP(cmd_go_help)
|
||||
BAREBOX_CMD_COMPLETE(cammand_var_complete)
|
||||
BAREBOX_CMD_COMPLETE(command_var_complete)
|
||||
BAREBOX_CMD_END
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* msleep.c - delay execution for n milliseconds
|
||||
*
|
||||
* Copyright (c) 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>, Pengutronix
|
||||
*
|
||||
* derived from commands/sleep.c
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2
|
||||
* as published by the Free Software Foundation.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <command.h>
|
||||
#include <clock.h>
|
||||
|
||||
static int do_msleep(int argc, char *argv[])
|
||||
{
|
||||
ulong delay;
|
||||
|
||||
if (argc != 2)
|
||||
return COMMAND_ERROR_USAGE;
|
||||
|
||||
delay = simple_strtoul(argv[1], NULL, 10);
|
||||
|
||||
mdelay(delay);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
BAREBOX_CMD_START(msleep)
|
||||
.cmd = do_msleep,
|
||||
.usage = "delay execution for n milliseconds",
|
||||
BAREBOX_CMD_END
|
|
@ -36,35 +36,6 @@
|
|||
#include <errno.h>
|
||||
#include <libbb.h>
|
||||
|
||||
#ifdef CONFIG_NET_RARP
|
||||
extern void RarpRequest(void);
|
||||
|
||||
static int do_rarpb(int argc, char *argv[])
|
||||
{
|
||||
int size;
|
||||
|
||||
if (NetLoopInit(RARP) < 0)
|
||||
return 1;
|
||||
|
||||
NetOurIP = 0;
|
||||
RarpRequest(); /* Basically same as BOOTP */
|
||||
|
||||
if ((size = NetLoop()) < 0)
|
||||
return 1;
|
||||
|
||||
/* NetLoop ok, update environment */
|
||||
netboot_update_env();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
BAREBOX_CMD_START(rarpboot)
|
||||
.cmd = do_rarpb,
|
||||
.usage = "boot image via network using rarp/tftp protocol",
|
||||
BAREBOX_CMD_HELP("[loadAddress] [bootfilename]\n")
|
||||
BAREBOX_CMD_END
|
||||
#endif /* CONFIG_NET_RARP */
|
||||
|
||||
static int do_ethact(int argc, char *argv[])
|
||||
{
|
||||
struct eth_device *edev;
|
||||
|
|
|
@ -47,5 +47,5 @@ static int do_sleep(int argc, char *argv[])
|
|||
BAREBOX_CMD_START(sleep)
|
||||
.cmd = do_sleep,
|
||||
.usage = "delay execution for n seconds",
|
||||
BAREBOX_CMD_COMPLETE(cammand_var_complete)
|
||||
BAREBOX_CMD_COMPLETE(command_var_complete)
|
||||
BAREBOX_CMD_END
|
||||
|
|
|
@ -198,7 +198,7 @@ int empty_complete(struct string_list *sl, char *instr)
|
|||
return COMPLETE_END;
|
||||
}
|
||||
|
||||
int cammand_var_complete(struct string_list *sl, char *instr)
|
||||
int command_var_complete(struct string_list *sl, char *instr)
|
||||
{
|
||||
return COMPLETE_CONTINUE;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ fi
|
|||
|
||||
if [ -f /env/bin/boot_board ]; then
|
||||
. /env/bin/boot_board
|
||||
else
|
||||
elif [ -n $autoboot_timeout ]; then
|
||||
echo
|
||||
echo -n "Hit any key to stop autoboot: "
|
||||
timeout -a $autoboot_timeout
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#define SYSCTL_PEREN 0x00000004
|
||||
#define SYSCTL_HCKEN 0x00000002
|
||||
#define SYSCTL_IPGEN 0x00000001
|
||||
#define SYSCTL_RSTA 0x01000000
|
||||
|
||||
#define IRQSTAT 0x0002e030
|
||||
#define IRQSTAT_DMAE (0x10000000)
|
||||
|
|
|
@ -49,6 +49,9 @@ static int devfs_write(struct device_d *_dev, FILE *f, const void *buf, size_t s
|
|||
{
|
||||
struct cdev *cdev = f->inode;
|
||||
|
||||
if (cdev->flags & DEVFS_PARTITION_READONLY)
|
||||
return -EPERM;
|
||||
|
||||
return cdev_write(cdev, buf, size, f->pos, f->flags);
|
||||
}
|
||||
|
||||
|
@ -70,6 +73,9 @@ static int devfs_erase(struct device_d *_dev, FILE *f, size_t count, loff_t offs
|
|||
{
|
||||
struct cdev *cdev = f->inode;
|
||||
|
||||
if (cdev->flags & DEVFS_PARTITION_READONLY)
|
||||
return -EPERM;
|
||||
|
||||
if (!cdev->ops->erase)
|
||||
return -ENOSYS;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ int command_complete(struct string_list *sl, char *instr);
|
|||
int device_complete(struct string_list *sl, char *instr);
|
||||
int empty_complete(struct string_list *sl, char *instr);
|
||||
int eth_complete(struct string_list *sl, char *instr);
|
||||
int cammand_var_complete(struct string_list *sl, char *instr);
|
||||
int command_var_complete(struct string_list *sl, char *instr);
|
||||
int devfs_partition_complete(struct string_list *sl, char *instr);
|
||||
|
||||
#endif /* __COMPLETE_ */
|
||||
|
|
Loading…
Reference in New Issue