From 3b4a7f99c954afad308d9c5a4513c856eb9a84b9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 19 Jan 2015 20:21:33 -0700 Subject: sandbox: Correct cros-ec keyboard definition The other boards got updated to the standard binding. Update sandbox as well. Signed-off-by: Simon Glass --- arch/sandbox/dts/sandbox.dts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'arch/sandbox') diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 11748aec79..68540befa9 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -73,10 +73,8 @@ cros-ec-keyb { compatible = "google,cros-ec-keyb"; - google,key-rows = <8>; - google,key-columns = <13>; - google,repeat-delay-ms = <240>; - google,repeat-rate-ms = <30>; + keypad,num-rows = <8>; + keypad,num-columns = <13>; google,ghost-filter; /* * Keymap entries take the form of 0xRRCCKKKK where -- cgit v1.2.3 From 1f32ae95784acee8a2233043aa18bf1b3a4974d7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 19 Jan 2015 20:21:34 -0700 Subject: sandbox: Add a -D option to use a default device tree It is painful to specify the full path to the device tree with the -d option. It is normally kept in the same directory as U-Boot, so provide an option to use this by default. Signed-off-by: Simon Glass --- arch/sandbox/cpu/start.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'arch/sandbox') diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 42353d80a8..097f29a290 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -102,6 +103,25 @@ static int sandbox_cmdline_cb_fdt(struct sandbox_state *state, const char *arg) } SANDBOX_CMDLINE_OPT_SHORT(fdt, 'd', 1, "Specify U-Boot's control FDT"); +static int sandbox_cmdline_cb_default_fdt(struct sandbox_state *state, + const char *arg) +{ + const char *fmt = "%s.dtb"; + char *fname; + int len; + + len = strlen(state->argv[0]) + strlen(fmt) + 1; + fname = os_malloc(len); + if (!fname) + return -ENOMEM; + snprintf(fname, len, fmt, state->argv[0]); + state->fdt_fname = fname; + + return 0; +} +SANDBOX_CMDLINE_OPT_SHORT(default_fdt, 'D', 0, + "Use the default u-boot.dtb control FDT in U-Boot directory"); + static int sandbox_cmdline_cb_interactive(struct sandbox_state *state, const char *arg) { -- cgit v1.2.3