Merge branch 'master' into next
This commit is contained in:
commit
e741110f5a
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
|||
VERSION = 2012
|
||||
PATCHLEVEL = 04
|
||||
PATCHLEVEL = 05
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION =
|
||||
NAME = Amissive Actinocutious Kiwi
|
||||
|
|
6
README
6
README
|
@ -56,7 +56,7 @@ Features
|
|||
'eth0.ip=192.168.0.7' or 'echo $eth0.ip'
|
||||
|
||||
- initcalls
|
||||
hooks in the startup process can be archieved with *_initcall() directives
|
||||
hooks in the startup process can be achieved with *_initcall() directives
|
||||
in each file.
|
||||
|
||||
- getopt
|
||||
|
@ -95,7 +95,7 @@ This command starts a menu box and lets you select all the different
|
|||
options available for your architecture. Once the configuration was
|
||||
finished (you can simulate this by using the standard demo config file
|
||||
with 'make sandbox_defconfig'), there is a .config file in the toplevel
|
||||
directory of the sourcode.
|
||||
directory of the source code.
|
||||
|
||||
Once barebox is configured, we can start the compilation
|
||||
|
||||
|
@ -106,7 +106,7 @@ If everything goes well, the result is a file called barebox:
|
|||
# ls -l barebox
|
||||
-rwxr-xr-x 1 rsc ptx 114073 Jun 26 22:34 barebox
|
||||
|
||||
Barebox usually needs an environment for storing the configuation data.
|
||||
Barebox usually needs an environment for storing the configuration data.
|
||||
You can generate an environment using the example environment contained
|
||||
in board/sandbox/env:
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ static iomux_v3_cfg_t f3s_pads[] = {
|
|||
MX51_PAD_NANDF_D11__FEC_RX_DV,
|
||||
MX51_PAD_NANDF_D9__FEC_RDATA0,
|
||||
MX51_PAD_NANDF_D8__FEC_TDATA0,
|
||||
MX51_PAD_CSPI1_SS0__GPIO4_24,
|
||||
MX51_PAD_CSPI1_SS0__ECSPI1_SS0,
|
||||
MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI,
|
||||
MX51_PAD_CSPI1_MISO__ECSPI1_MISO,
|
||||
MX51_PAD_CSPI1_RDY__ECSPI1_RDY,
|
||||
|
|
|
@ -210,7 +210,7 @@ static inline void tx51_fec_init(void)
|
|||
gpio_set_value(TX51_FEC_PHY_PWR, 1);
|
||||
|
||||
/*
|
||||
* Wait some time to let the phy activate the internal regulator
|
||||
* Wait some time to let the phy activate the internal regulator
|
||||
*/
|
||||
mdelay(10);
|
||||
|
||||
|
|
|
@ -121,42 +121,10 @@ static struct at91_ether_platform_data macb_pdata = {
|
|||
.phy_addr = 0,
|
||||
};
|
||||
|
||||
static void tny_a9260_phy_reset(void)
|
||||
{
|
||||
unsigned long rstc;
|
||||
struct clk *clk = clk_get(NULL, "macb_clk");
|
||||
|
||||
clk_enable(clk);
|
||||
|
||||
at91_set_gpio_input(AT91_PIN_PA14, 0);
|
||||
at91_set_gpio_input(AT91_PIN_PA15, 0);
|
||||
at91_set_gpio_input(AT91_PIN_PA17, 0);
|
||||
at91_set_gpio_input(AT91_PIN_PA25, 0);
|
||||
at91_set_gpio_input(AT91_PIN_PA26, 0);
|
||||
at91_set_gpio_input(AT91_PIN_PA28, 0);
|
||||
|
||||
rstc = at91_sys_read(AT91_RSTC_MR) & AT91_RSTC_ERSTL;
|
||||
|
||||
/* Need to reset PHY -> 500ms reset */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
(AT91_RSTC_ERSTL & (0x0d << 8)) |
|
||||
AT91_RSTC_URSTEN);
|
||||
|
||||
at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
|
||||
|
||||
/* Wait for end hardware reset */
|
||||
while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
|
||||
|
||||
/* Restore NRST value */
|
||||
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
|
||||
(rstc) |
|
||||
AT91_RSTC_URSTEN);
|
||||
}
|
||||
|
||||
static void __init ek_add_device_macb(void)
|
||||
{
|
||||
tny_a9260_phy_reset();
|
||||
at91_add_device_eth(0, &macb_pdata);
|
||||
if (IS_ENABLED(CONFIG_CALAO_MOB_TNY_MD2))
|
||||
at91_add_device_eth(0, &macb_pdata);
|
||||
}
|
||||
#else
|
||||
static void __init ek_add_device_macb(void) {}
|
||||
|
@ -240,6 +208,8 @@ device_initcall(tny_a9260_devices_init);
|
|||
static int tny_a9260_console_init(void)
|
||||
{
|
||||
at91_register_uart(0, 0);
|
||||
if (IS_ENABLED(CONFIG_CALAO_MOB_TNY_MD2))
|
||||
at91_register_uart(2, ATMEL_UART_CTS | ATMEL_UART_RTS);
|
||||
return 0;
|
||||
}
|
||||
console_initcall(tny_a9260_console_init);
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
CONFIG_ARCH_AT91SAM9260=y
|
||||
CONFIG_MACH_TNY_A9260=y
|
||||
CONFIG_CALAO_MOB_TNY_MD2=y
|
||||
CONFIG_AEABI=y
|
||||
# CONFIG_CMD_ARM_CPUINFO is not set
|
||||
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
|
||||
|
@ -33,7 +34,6 @@ CONFIG_CMD_LOADB=y
|
|||
CONFIG_CMD_MEMINFO=y
|
||||
CONFIG_CMD_MD5SUM=y
|
||||
CONFIG_CMD_SHA1SUM=y
|
||||
CONFIG_CMD_SHA256SUM=y
|
||||
CONFIG_CMD_MTEST=y
|
||||
CONFIG_CMD_MTEST_ALTERNATIVE=y
|
||||
CONFIG_CMD_FLASH=y
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
CONFIG_ARCH_AT91SAM9263=y
|
||||
CONFIG_MACH_TNY_A9263=y
|
||||
CONFIG_CALAO_MOB_TNY_MD2=y
|
||||
CONFIG_AEABI=y
|
||||
# CONFIG_CMD_ARM_CPUINFO is not set
|
||||
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
|
||||
|
@ -33,7 +34,6 @@ CONFIG_CMD_LOADB=y
|
|||
CONFIG_CMD_MEMINFO=y
|
||||
CONFIG_CMD_MD5SUM=y
|
||||
CONFIG_CMD_SHA1SUM=y
|
||||
CONFIG_CMD_SHA256SUM=y
|
||||
CONFIG_CMD_MTEST=y
|
||||
CONFIG_CMD_MTEST_ALTERNATIVE=y
|
||||
CONFIG_CMD_FLASH=y
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
CONFIG_ARCH_AT91SAM9G20=y
|
||||
CONFIG_MACH_TNY_A9G20=y
|
||||
CONFIG_CALAO_MOB_TNY_MD2=y
|
||||
CONFIG_AEABI=y
|
||||
# CONFIG_CMD_ARM_CPUINFO is not set
|
||||
CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
|
||||
|
@ -33,7 +34,6 @@ CONFIG_CMD_LOADB=y
|
|||
CONFIG_CMD_MEMINFO=y
|
||||
CONFIG_CMD_MD5SUM=y
|
||||
CONFIG_CMD_SHA1SUM=y
|
||||
CONFIG_CMD_SHA256SUM=y
|
||||
CONFIG_CMD_MTEST=y
|
||||
CONFIG_CMD_MTEST_ALTERNATIVE=y
|
||||
CONFIG_CMD_FLASH=y
|
||||
|
|
|
@ -104,6 +104,9 @@ config ARCH_BAREBOX_MAX_BARE_INIT_SIZE
|
|||
config SUPPORT_CALAO_DAB_MMX
|
||||
bool
|
||||
|
||||
config SUPPORT_CALAO_MOB_TNY_MD2
|
||||
bool
|
||||
|
||||
# ----------------------------------------------------------
|
||||
|
||||
if ARCH_AT91RM9200
|
||||
|
@ -138,6 +141,7 @@ config MACH_AT91SAM9260EK
|
|||
|
||||
config MACH_TNY_A9260
|
||||
bool "CALAO TNY-A9260"
|
||||
select SUPPORT_CALAO_MOB_TNY_MD2
|
||||
help
|
||||
Select this if you are using a Calao Systems TNY-A9260.
|
||||
<http://www.calao-systems.com>
|
||||
|
@ -214,6 +218,7 @@ config MACH_AT91SAM9G20EK
|
|||
that embeds only one SD/MMC slot.
|
||||
|
||||
config MACH_TNY_A9G20
|
||||
select SUPPORT_CALAO_MOB_TNY_MD2
|
||||
bool "CALAO TNY-A9G20"
|
||||
help
|
||||
Select this if you are using a Calao Systems TNY-A9G20.
|
||||
|
@ -264,6 +269,7 @@ config MACH_PM9263
|
|||
|
||||
config MACH_TNY_A9263
|
||||
bool "CALAO TNY-A9263"
|
||||
select SUPPORT_CALAO_MOB_TNY_MD2
|
||||
help
|
||||
Select this if you are using a Calao Systems TNY-A9263.
|
||||
<http://www.calao-systems.com>
|
||||
|
@ -362,4 +368,8 @@ config CALAO_DAB_MMX
|
|||
bool "DAB MMX Daughter Board support"
|
||||
depends on SUPPORT_CALAO_DAB_MMX
|
||||
|
||||
config CALAO_MOB_TNY_MD2
|
||||
bool "MOB TNY MD2 Motherboard Daughter Board support"
|
||||
depends on SUPPORT_CALAO_MOB_TNY_MD2
|
||||
|
||||
endif
|
||||
|
|
|
@ -273,27 +273,22 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
|
|||
case 0: /* DBGU */
|
||||
configure_dbgu_pins();
|
||||
start = AT91_BASE_SYS + AT91_DBGU;
|
||||
id = 0;
|
||||
break;
|
||||
case AT91RM9200_ID_US0:
|
||||
case 1:
|
||||
configure_usart0_pins(pins);
|
||||
start = AT91RM9200_BASE_US0;
|
||||
id = 1;
|
||||
break;
|
||||
case AT91RM9200_ID_US1:
|
||||
case 2:
|
||||
configure_usart1_pins(pins);
|
||||
start = AT91RM9200_BASE_US1;
|
||||
id = 2;
|
||||
break;
|
||||
case AT91RM9200_ID_US2:
|
||||
case 3:
|
||||
configure_usart2_pins(pins);
|
||||
start = AT91RM9200_BASE_US2;
|
||||
id = 3;
|
||||
break;
|
||||
case AT91RM9200_ID_US3:
|
||||
case 4:
|
||||
configure_usart3_pins(pins);
|
||||
start = AT91RM9200_BASE_US3;
|
||||
id = 4;
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
|
|
|
@ -290,37 +290,30 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
|
|||
case 0: /* DBGU */
|
||||
configure_dbgu_pins();
|
||||
start = AT91_BASE_SYS + AT91_DBGU;
|
||||
id = 0;
|
||||
break;
|
||||
case AT91SAM9260_ID_US0:
|
||||
case 1:
|
||||
configure_usart0_pins(pins);
|
||||
start = AT91SAM9260_BASE_US0;
|
||||
id = 1;
|
||||
break;
|
||||
case AT91SAM9260_ID_US1:
|
||||
case 2:
|
||||
configure_usart1_pins(pins);
|
||||
start = AT91SAM9260_BASE_US1;
|
||||
id = 2;
|
||||
break;
|
||||
case AT91SAM9260_ID_US2:
|
||||
case 3:
|
||||
configure_usart2_pins(pins);
|
||||
start = AT91SAM9260_BASE_US2;
|
||||
id = 3;
|
||||
break;
|
||||
case AT91SAM9260_ID_US3:
|
||||
case 4:
|
||||
configure_usart3_pins(pins);
|
||||
start = AT91SAM9260_BASE_US3;
|
||||
id = 4;
|
||||
break;
|
||||
case AT91SAM9260_ID_US4:
|
||||
case 5:
|
||||
configure_usart4_pins();
|
||||
start = AT91SAM9260_BASE_US4;
|
||||
id = 5;
|
||||
break;
|
||||
case AT91SAM9260_ID_US5:
|
||||
case 6:
|
||||
configure_usart5_pins();
|
||||
start = AT91SAM9260_BASE_US5;
|
||||
id = 6;
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
|
|
|
@ -211,22 +211,18 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
|
|||
case 0: /* DBGU */
|
||||
configure_dbgu_pins();
|
||||
start = AT91_BASE_SYS + AT91_DBGU;
|
||||
id = 0;
|
||||
break;
|
||||
case AT91SAM9261_ID_US0:
|
||||
case 1:
|
||||
configure_usart0_pins(pins);
|
||||
start = AT91SAM9261_BASE_US0;
|
||||
id = 1;
|
||||
break;
|
||||
case AT91SAM9261_ID_US1:
|
||||
case 2:
|
||||
configure_usart1_pins(pins);
|
||||
start = AT91SAM9261_BASE_US1;
|
||||
id = 2;
|
||||
break;
|
||||
case AT91SAM9261_ID_US2:
|
||||
case 3:
|
||||
configure_usart2_pins(pins);
|
||||
start = AT91SAM9261_BASE_US2;
|
||||
id = 3;
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
|
|
|
@ -261,22 +261,18 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
|
|||
case 0: /* DBGU */
|
||||
configure_dbgu_pins();
|
||||
start = AT91_BASE_SYS + AT91_DBGU;
|
||||
id = 0;
|
||||
break;
|
||||
case AT91SAM9263_ID_US0:
|
||||
case 1:
|
||||
configure_usart0_pins(pins);
|
||||
start = AT91SAM9263_BASE_US0;
|
||||
id = 1;
|
||||
break;
|
||||
case AT91SAM9263_ID_US1:
|
||||
case 2:
|
||||
configure_usart1_pins(pins);
|
||||
start = AT91SAM9263_BASE_US1;
|
||||
id = 2;
|
||||
break;
|
||||
case AT91SAM9263_ID_US2:
|
||||
case 3:
|
||||
configure_usart2_pins(pins);
|
||||
start = AT91SAM9263_BASE_US2;
|
||||
id = 3;
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
|
|
|
@ -190,27 +190,22 @@ struct device_d * __init at91_register_uart(unsigned id, unsigned pins)
|
|||
case 0: /* DBGU */
|
||||
configure_dbgu_pins();
|
||||
start = AT91_BASE_SYS + AT91_DBGU;
|
||||
id = 0;
|
||||
break;
|
||||
case AT91SAM9G45_ID_US0:
|
||||
case 1:
|
||||
configure_usart0_pins(pins);
|
||||
start = AT91SAM9G45_BASE_US0;
|
||||
id = 1;
|
||||
break;
|
||||
case AT91SAM9G45_ID_US1:
|
||||
case 2:
|
||||
configure_usart1_pins(pins);
|
||||
start = AT91SAM9G45_BASE_US1;
|
||||
id = 2;
|
||||
break;
|
||||
case AT91SAM9G45_ID_US2:
|
||||
case 3:
|
||||
configure_usart2_pins(pins);
|
||||
start = AT91SAM9G45_BASE_US2;
|
||||
id = 3;
|
||||
break;
|
||||
case AT91SAM9G45_ID_US3:
|
||||
case 4:
|
||||
configure_usart3_pins(pins);
|
||||
start = AT91SAM9G45_BASE_US3;
|
||||
id = 4;
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
|
|
|
@ -115,9 +115,9 @@ BAREBOX_CMD_HELP_START(echo)
|
|||
BAREBOX_CMD_HELP_USAGE("echo [OPTIONS] [STRING]\n")
|
||||
BAREBOX_CMD_HELP_SHORT("Display a line of text.\n")
|
||||
BAREBOX_CMD_HELP_OPT ("-n", "do not output the trailing newline\n")
|
||||
BAREBOX_CMD_HELP_OPT ("-a", "FIXME\n")
|
||||
BAREBOX_CMD_HELP_OPT ("-o", "FIXME\n")
|
||||
BAREBOX_CMD_HELP_OPT ("-e", "FIXME\n")
|
||||
BAREBOX_CMD_HELP_OPT ("-a <file>", "instead of outputting to stdout append to <file>\n")
|
||||
BAREBOX_CMD_HELP_OPT ("-o <file>", "instead of outputting to stdout overwrite <file>\n")
|
||||
BAREBOX_CMD_HELP_OPT ("-e", "recognize escape sequences\n")
|
||||
BAREBOX_CMD_HELP_END
|
||||
|
||||
/**
|
||||
|
|
|
@ -177,7 +177,7 @@ static int do_i2c_read(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if ((addr < 0) || (reg < 0) || (count == 0) || (addr > 0x7F))
|
||||
if ((addr < 0) || (reg < 0) || (count < 1) || (addr > 0x7F))
|
||||
return COMMAND_ERROR_USAGE;
|
||||
|
||||
adapter = i2c_get_adapter(bus);
|
||||
|
|
|
@ -272,7 +272,7 @@ static char* cmd_complete_lookup(struct string_list *sl, char *instr)
|
|||
{
|
||||
struct command *cmdtp;
|
||||
int len;
|
||||
int ret = 1;
|
||||
int ret = COMPLETE_END;
|
||||
char *res = NULL;
|
||||
|
||||
for_each_command(cmdtp) {
|
||||
|
|
|
@ -1590,6 +1590,7 @@ static int parse_stream_outer(struct p_context *ctx, struct in_str *inp, int fla
|
|||
|
||||
if (rcode != 1 && ctx->old_flag != 0) {
|
||||
syntax();
|
||||
return 1;
|
||||
}
|
||||
if (rcode != 1 && ctx->old_flag == 0) {
|
||||
done_word(&temp, ctx);
|
||||
|
@ -1614,8 +1615,9 @@ static int parse_stream_outer(struct p_context *ctx, struct in_str *inp, int fla
|
|||
inp->__promptme = 1;
|
||||
temp.nonnull = 0;
|
||||
temp.quote = 0;
|
||||
inp->p = NULL;
|
||||
free_pipe_list(ctx->list_head, 0);
|
||||
free_pipe_list(ctx->list_head,0);
|
||||
b_free(&temp);
|
||||
return 1;
|
||||
}
|
||||
b_free(&temp);
|
||||
} while (rcode != -1 && !(flag & FLAG_EXIT_FROM_LOOP)); /* loop on syntax errors, return on EOF */
|
||||
|
|
|
@ -58,7 +58,7 @@ void mem_malloc_init(void *start, void *end)
|
|||
malloc_end = (unsigned long)end;
|
||||
malloc_brk = malloc_start;
|
||||
#ifdef CONFIG_MALLOC_TLSF
|
||||
tlsf_mem_pool = tlsf_create(start, (char *)end - (char *)start);
|
||||
tlsf_mem_pool = tlsf_create(start, end - start + 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -404,8 +404,12 @@ struct resource *file_to_sdram(const char *filename, unsigned long adr)
|
|||
res = NULL;
|
||||
goto out;
|
||||
}
|
||||
if (now < BUFSIZ)
|
||||
|
||||
if (now < BUFSIZ) {
|
||||
release_sdram_region(res);
|
||||
res = request_sdram_region("image", adr, ofs + now);
|
||||
goto out;
|
||||
}
|
||||
|
||||
release_sdram_region(res);
|
||||
|
||||
|
|
|
@ -38,9 +38,6 @@ static struct mc13xxx *mc_dev;
|
|||
|
||||
struct mc13xxx *mc13xxx_get(void)
|
||||
{
|
||||
if (!mc_dev)
|
||||
return NULL;
|
||||
|
||||
return mc_dev;
|
||||
}
|
||||
EXPORT_SYMBOL(mc13xxx_get);
|
||||
|
@ -308,6 +305,7 @@ static int mc_probe(struct device_d *dev, enum mc13xxx_mode mode)
|
|||
rev = mc13xxx_query_revision(mc_dev);
|
||||
if (rev < 0) {
|
||||
free(mc_dev);
|
||||
mc_dev = NULL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
11
net/dns.c
11
net/dns.c
|
@ -197,6 +197,7 @@ static void dns_handler(void *ctx, char *packet, unsigned len)
|
|||
IPaddr_t resolv(char *host)
|
||||
{
|
||||
IPaddr_t ip;
|
||||
const char *ns;
|
||||
|
||||
if (!string_to_ip(host, &ip))
|
||||
return ip;
|
||||
|
@ -205,8 +206,14 @@ IPaddr_t resolv(char *host)
|
|||
|
||||
dns_state = STATE_INIT;
|
||||
|
||||
ip = getenv_ip("net.nameserver");
|
||||
if (!ip)
|
||||
ns = getenv("net.nameserver");
|
||||
if (!ns || !*ns) {
|
||||
printk("%s: no nameserver specified in $net.nameserver\n",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (string_to_ip(ns, &ip))
|
||||
return 0;
|
||||
|
||||
debug("resolving host %s via nameserver %s\n", host, ip_to_string(ip));
|
||||
|
|
Loading…
Reference in New Issue