[PATCH 3/3] serial/imx: parse from device tree support

2011-02-18 Thread Jason Liu
Signed-off-by: Jason Liu 
---
 drivers/tty/serial/imx.c |   81 --
 1 files changed, 71 insertions(+), 10 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
old mode 100644
new mode 100755
index dfcf4b1..3388599
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -52,6 +52,10 @@
 #include 
 #include 
 #include 
+#ifdef CONFIG_OF
+#include 
+#include 
+#endif /* CONFIG_OF */
 
 /* Register definitions */
 #define URXD0 0x0  /* Receiver Register */
@@ -1224,6 +1228,54 @@ static int serial_imx_resume(struct platform_device *dev)
return 0;
 }
 
+#ifdef CONFIG_OF
+static int serial_imx_probe_dt(struct imx_port *sport,
+   struct platform_device *pdev)
+{
+   struct device_node *node = pdev->dev.of_node;
+   static int line;
+
+   if (!node)
+   return -ENODEV;
+
+   if (of_get_property(node, "rts-cts", NULL))
+   sport->have_rtscts = 1;
+
+#ifdef CONFIG_IRDA
+   if (of_get_property(node, "irda", NULL))
+   sport->use_irda = 1;
+#endif
+   sport->port.line = line++;
+
+   return 0;
+}
+#else
+static int serial_imx_probe_dt(struct imx_port *sport,
+   struct platform_device *pdev)
+{
+   return -ENODEV;
+}
+#endif
+
+static int serial_imx_probe_pdata(struct imx_port *sport,
+   struct platform_device *pdev)
+{
+   struct imxuart_platform_data *pdata = pdev->dev.platform_data;
+
+   if (!pdata)
+   return 0;
+
+   if (pdata->flags & IMXUART_HAVE_RTSCTS)
+   sport->have_rtscts = 1;
+
+#ifdef CONFIG_IRDA
+   if (pdata->flags & IMXUART_IRDA)
+   sport->use_irda = 1;
+#endif
+   sport->port.line = pdev->id;
+
+   return 0;
+}
 static int serial_imx_probe(struct platform_device *pdev)
 {
struct imx_port *sport;
@@ -1236,6 +1288,12 @@ static int serial_imx_probe(struct platform_device *pdev)
if (!sport)
return -ENOMEM;
 
+   ret = serial_imx_probe_dt(sport, pdev);
+   if (ret == -ENODEV)
+   ret = serial_imx_probe_pdata(sport, pdev);
+   if (ret)
+   goto free;
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
ret = -ENODEV;
@@ -1260,7 +1318,6 @@ static int serial_imx_probe(struct platform_device *pdev)
sport->port.fifosize = 32;
sport->port.ops = &imx_pops;
sport->port.flags = UPF_BOOT_AUTOCONF;
-   sport->port.line = pdev->id;
init_timer(&sport->timer);
sport->timer.function = imx_timeout;
sport->timer.data = (unsigned long)sport;
@@ -1274,17 +1331,13 @@ static int serial_imx_probe(struct platform_device 
*pdev)
 
sport->port.uartclk = clk_get_rate(sport->clk);
 
-   imx_ports[pdev->id] = sport;
+   if (imx_ports[sport->port.line]) {
+   ret = -EBUSY;
+   goto clkput;
+   }
+   imx_ports[sport->port.line] = sport;
 
pdata = pdev->dev.platform_data;
-   if (pdata && (pdata->flags & IMXUART_HAVE_RTSCTS))
-   sport->have_rtscts = 1;
-
-#ifdef CONFIG_IRDA
-   if (pdata && (pdata->flags & IMXUART_IRDA))
-   sport->use_irda = 1;
-#endif
-
if (pdata && pdata->init) {
ret = pdata->init(pdev);
if (ret)
@@ -1336,6 +1389,11 @@ static int serial_imx_remove(struct platform_device 
*pdev)
return 0;
 }
 
+static struct of_device_id imx_uart_matches[] = {
+   { .compatible = "imx-uart" },
+   {},
+};
+
 static struct platform_driver serial_imx_driver = {
.probe  = serial_imx_probe,
.remove = serial_imx_remove,
@@ -1345,6 +1403,9 @@ static struct platform_driver serial_imx_driver = {
.driver = {
.name   = "imx-uart",
.owner  = THIS_MODULE,
+#if defined(CONFIG_OF)
+   .of_match_table = imx_uart_matches,
+#endif
},
 };
 
-- 
1.7.0.4



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 2/3] arm/dt: add very basic dts file for babbage board

2011-02-18 Thread Jason Liu
Signed-off-by: Jason Liu 
---
 arch/arm/boot/dts/babbage.dts |  117 +
 1 files changed, 117 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/babbage.dts b/arch/arm/boot/dts/babbage.dts
new file mode 100644
index 000..7ee26f1
--- /dev/null
+++ b/arch/arm/boot/dts/babbage.dts
@@ -0,0 +1,117 @@
+/dts-v1/;
+
+/ {
+   model = "mx51_babbage";
+   compatible = "fsl,mx51_babbage";
+   #address-cells = <0x1>;
+   #size-cells = <0x1>;
+   #interrupt-cells = <0x1>;
+   interrupt-parent = <0x1>;
+
+   memory {
+   device_type = "memory";
+   reg = <0x9000 0x2000>;
+   };
+
+   chosen {
+   bootargs = "console=ttymxc1,115200n8 debug earlyprintk";
+   };
+
+   soc {
+   #address-cells = <0x1>;
+   #size-cells = <0x1>;
+   device_type = "soc";
+   compatible = "simple-bus";
+   ranges = <0x0 0x0 0x>;
+
+   tzic {
+   #address-cells = <0x0>;
+   #interrupt-cells = <0x1>;
+   interrupt-controller;
+   reg = <0xe000 0x1000>;
+   compatible = "fsl,tzic";
+   device_type = "tzic";
+   phandle = <0x1>;
+   };
+   };
+
+   clocks {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   uart_clk0: uart@0 {
+   compatible = "clock";
+   clock-outputs = "imx-uart.0";
+   };
+
+   uart_clk1: uart@1{
+   compatible = "clock";
+   clock-outputs = "imx-uart.1";
+   };
+
+   uart_clk2: uart@2{
+   compatible = "clock";
+   clock-outputs = "imx-uart.2";
+   };
+
+   fec_clk: @0{
+   compatible = "clock";
+   clock-outputs = "fec.0";
+   };
+   };
+
+   spba@7000 {
+   #address-cells = <0x1>;
+   #size-cells = <0x1>;
+   device_type = "soc";
+   compatible = "simple-bus";
+   ranges = <0x0 0x7000 0x10>;
+
+   imx-uart@C000 {
+   compatible = "imx-uart";
+   reg = <0xc000 0x1000>;
+   interrupts = <0x21>;
+   rts-cts;
+   uart-clock = < &uart_clk2 >, "uart";
+   };
+   };
+
+   aips@73f0 {
+   #address-cells = <0x1>;
+   #size-cells = <0x1>;
+   device_type = "soc";
+   compatible = "simple-bus";
+   ranges = <0x0 0x73f0 0x10>;
+
+   imx-uart@BC000 {
+   compatible = "imx-uart";
+   reg = <0xbc000 0x1000>;
+   interrupts = <0x1f>;
+   rts-cts;
+   uart-clock = < &uart_clk0 >, "uart";
+   };
+
+   imx-uart@C {
+   compatible = "imx-uart";
+   reg = <0xc 0x1000>;
+   interrupts = <0x20>;
+   rts-cts;
+   uart-clock = <&uart_clk1>, "uart";
+   };
+   };
+
+   aips@83f0 {
+   #address-cells = <0x1>;
+   #size-cells = <0x1>;
+   device_type = "soc";
+   compatible = "simple-bus";
+   ranges = <0x0 0x83f0 0x10>;
+
+   fec@EC000 {
+   compatible = "fec";
+   reg = <0xec000 0x1000>;
+   interrupts = <0x57>;
+   fec_clk-clock = < &fec_clk >, "fec";
+   };
+   };
+};
-- 
1.7.0.4



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 0/3] Add MX51 basic DT support

2011-02-18 Thread Jason Liu
This patchset adds FSL mx51 device tree support. This
is based on

git://git.secretlab.ca/git/linux-2.6 devicetree/test

This patch has been tested on MX51 babbage board and can
boot up succesfully to linux console with DT enabled.

Jason Liu (3):
  arm/dt: add basic mx51 device tree support
  arm/dt: add very basic dts file for babbage board
  serial/imx: parse from device tree support

 arch/arm/boot/dts/babbage.dts   |  117 +++
 arch/arm/mach-mx5/Kconfig   |6 ++
 arch/arm/mach-mx5/Makefile  |1 +
 arch/arm/mach-mx5/board-dt.c|   64 +
 arch/arm/mach-mx5/clock-mx51-mx53.c |   45 -
 arch/arm/plat-mxc/include/mach/common.h |1 +
 drivers/tty/serial/imx.c|   81 +++---
 7 files changed, 304 insertions(+), 11 deletions(-)
 create mode 100644 arch/arm/boot/dts/babbage.dts
 create mode 100644 arch/arm/mach-mx5/board-dt.c
 mode change 100644 => 100755 drivers/tty/serial/imx.c



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH 1/3] arm/dt: add basic mx51 device tree support

2011-02-18 Thread Jason Liu
Signed-off-by: Jason Liu 
---
 arch/arm/mach-mx5/Kconfig   |6 +++
 arch/arm/mach-mx5/Makefile  |1 +
 arch/arm/mach-mx5/board-dt.c|   64 +++
 arch/arm/mach-mx5/clock-mx51-mx53.c |   45 +-
 arch/arm/plat-mxc/include/mach/common.h |1 +
 5 files changed, 116 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index de4fa99..5fbbd36 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -47,6 +47,12 @@ config MACH_MX51_BABBAGE
  u-boot. This includes specific configurations for the board and its
  peripherals.
 
+config MACH_MX51_DT
+   bool "Generic MX51 board (FDT support)"
+   select USE_OF
+   help
+ Support for generic Freescale MX51 boards using Flattened Device Tree.
+
 config MACH_MX51_3DS
bool "Support MX51PDK (3DS)"
select SOC_IMX51
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile
index 0d43be9..540697e 100644
--- a/arch/arm/mach-mx5/Makefile
+++ b/arch/arm/mach-mx5/Makefile
@@ -18,3 +18,4 @@ obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o
 obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd-baseboard.o
 obj-$(CONFIG_MACH_MX51_EFIKAMX) += board-mx51_efikamx.o
 obj-$(CONFIG_MACH_MX50_RDP) += board-mx50_rdp.o
+obj-$(CONFIG_MACH_MX51_DT) += board-dt.o
diff --git a/arch/arm/mach-mx5/board-dt.c b/arch/arm/mach-mx5/board-dt.c
new file mode 100644
index 000..78ecd12
--- /dev/null
+++ b/arch/arm/mach-mx5/board-dt.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "devices.h"
+
+static struct of_device_id mx51_dt_match_table[] __initdata = {
+   { .compatible = "simple-bus", },
+   {}
+};
+
+static void __init mx51_dt_board_init(void)
+{
+   of_platform_bus_probe(NULL, mx51_dt_match_table, NULL);
+}
+
+static void __init mx51_dt_timer_init(void)
+{
+   mx51_clocks_init(32768, 2400, 22579200, 0);
+   mx5_clk_dt_init();
+}
+
+static struct sys_timer mxc_timer = {
+   .init = mx51_dt_timer_init,
+};
+
+static const char * mx51_dt_board_compat[] = {
+   "fsl,mx51_babbage",
+   NULL
+};
+
+DT_MACHINE_START(MX51_DT, "Freescale MX51 (Flattened Device Tree)")
+   .boot_params  = PHYS_OFFSET + 0x100,
+   .map_io   = mx51_map_io,
+   .init_irq = mx51_init_irq,
+   .init_machine = mx51_dt_board_init,
+   .dt_compat= mx51_dt_board_compat,
+   .timer= &mxc_timer,
+MACHINE_END
diff --git a/arch/arm/mach-mx5/clock-mx51-mx53.c 
b/arch/arm/mach-mx5/clock-mx51-mx53.c
index 0a19e75..b8a608e 100644
--- a/arch/arm/mach-mx5/clock-mx51-mx53.c
+++ b/arch/arm/mach-mx5/clock-mx51-mx53.c
@@ -15,13 +15,19 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
 
 #include 
 #include 
 #include 
 
+#ifdef CONFIG_OF
+#include 
+#include 
+#include 
+#endif /* CONFIG_OF */
+
 #include "crm_regs.h"
 
 /* External clock values passed-in by the board code */
@@ -1432,3 +1438,40 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned 
long osc,
MX53_INT_GPT);
return 0;
 }
+
+#ifdef CONFIG_OF
+static struct clk* mx5_dt_clk_get(struct device_node *np,
+   const char *output_id, void *data)
+{
+   return data;
+}
+
+static __init void mx5_dt_scan_clks(void)
+{
+   struct device_node *node;
+   struct clk *clk;
+   const char *id;
+   int rc;
+
+   for_each_compatible_node(node, NULL, "clock") {
+   id = of_get_property(node, "clock-outputs", NULL);
+   if (!id)
+   continue;
+
+   clk = clk_get_sys(id, NULL);
+   if (IS_ERR(clk))
+   continue;
+
+   rc = of_clk_add_provider(node, mx5_dt_clk_get, clk);
+   if (rc) {
+   kfree(clk);
+   pr_err("error adding fixed clk %s\n", node->name);
+   }
+   }
+}
+
+void __init mx5_clk_dt_init(void)
+{
+   mx5_dt_scan_clks();
+}
+#endif
diff --git a/arch/arm/plat-mxc/include/mach/common.h 
b/arch/arm/plat-mxc/include/mach/common.h
index aea2cd3..a28e84a 100644
--- a/arch/arm/plat-mxc/include/mach/common.h
+++ b/arch/arm/plat-mxc/include/mach/common.h
@@ -58,4 +58,5 @@ extern void mxc91231_arch_reset(int, const char *);
 extern void mxc91231_prepare_idle(void);
 extern void mx51_efikamx_reset(void);

Re: [PATCH 3/3] serial/imx: parse from device tree support

2011-02-18 Thread Arnd Bergmann
Hi Jason,

The patch looks good, but I noticed a few details that can be improved.

On Friday 18 February 2011, Jason Liu wrote:
> index dfcf4b1..3388599
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -52,6 +52,10 @@
>  #include 
>  #include 
>  #include 
> +#ifdef CONFIG_OF
> +#include 
> +#include 
> +#endif /* CONFIG_OF */
>  
>  /* Register definitions */
>  #define URXD0 0x0  /* Receiver Register */

There is generally no need to enclose any header incudes in #ifdef.
If there is a problem in the header when included without CONFIG_OF set,
that should be fixed in the header.

> @@ -1224,6 +1228,54 @@ static int serial_imx_resume(struct platform_device 
> *dev)
> return 0;
>  }
>  
> +#ifdef CONFIG_OF
> +static int serial_imx_probe_dt(struct imx_port *sport,
> +   struct platform_device *pdev)
> +{
> +   struct device_node *node = pdev->dev.of_node;
> +   static int line;
> +
> +   if (!node)
> +   return -ENODEV;
> +
> +   if (of_get_property(node, "rts-cts", NULL))
> +   sport->have_rtscts = 1;
> +
> +#ifdef CONFIG_IRDA
> +   if (of_get_property(node, "irda", NULL))
> +   sport->use_irda = 1;
> +#endif
> +   sport->port.line = line++;
> +
> +   return 0;
> +}
> +#else
> +static int serial_imx_probe_dt(struct imx_port *sport,
> +   struct platform_device *pdev)
> +{
> +   return -ENODEV;
> +}
> +#endif

Similarly, there is no need to have the #ifdef CONFIG_IRDA here.
This one takes up a few bytes of probe code, but otherwise makes
the code more readable.

Arnd

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[pytimechart] new cpuidle tracepoint

2011-02-18 Thread Vincent Guittot
Hi,

I have started to use the new cpuidle tracepoint and created a plugin
for pytimechart.
I'm not sure if it's the right way to add this cpuidle trace format
update but it's the less intrusive one.

I also have a plugin for new cpu_hotplug trace points but i'm waiting
for trace approval before sending it

Vincent

Subject: [PATCH 1/1] cpuidle: new plugin
  new tracepoints are available for cpuidle


Signed-off-by: Vincent Guittot 
---
 timechart/plugins/cpuidle.py |   35 +++
 1 files changed, 35 insertions(+), 0 deletions(-)
 create mode 100644 timechart/plugins/cpuidle.py

diff --git a/timechart/plugins/cpuidle.py b/timechart/plugins/cpuidle.py
new file mode 100644
index 000..32dce91
--- /dev/null
+++ b/timechart/plugins/cpuidle.py
@@ -0,0 +1,35 @@
+from timechart.plugin import *
+from timechart import colors
+from timechart.model import tcProcess, c_state_table
+
+class cpu_idle(plugin):
+additional_colors = """
+"""
+additional_ftrace_parsers = [
+('cpu_idle',  'state=%d cpu_id=%d', 'state', 'cpuid'),
+]
+
+additional_process_types = {
+}
+
+@staticmethod
+def do_event_cpu_idle(self,event):
+self.ensure_cpu_allocated(event.cpuid)
+tc = self.tmp_c_states[event.cpuid]
+if event.state != 4294967295 :
+if len(tc['start_ts'])>len(tc['end_ts']):
+tc['end_ts'].append(event.timestamp)
+self.missed_power_end +=1
+if self.missed_power_end < 10:
+print "warning: missed cpu_idle end"
+if self.missed_power_end == 10:
+print "warning: missed cpu_idle end: wont warn anymore!"
+tc['start_ts'].append(event.timestamp)
+
tc['types'].append(colors.get_color_id(c_state_table[int(event.state)]))
+tc['linenumbers'].append(event.linenumber)
+else :
+if len(tc['start_ts'])>len(tc['end_ts']):
+tc['end_ts'].append(event.timestamp)
+
+plugin_register(cpu_idle)
+
-- 
1.7.1

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 0/3] Add MX51 basic DT support

2011-02-18 Thread Rob Herring

Jason,

On 02/18/2011 02:12 AM, Jason Liu wrote:

This patchset adds FSL mx51 device tree support. This
is based on

git://git.secretlab.ca/git/linux-2.6 devicetree/test

This patch has been tested on MX51 babbage board and can
boot up succesfully to linux console with DT enabled.

Jason Liu (3):
   arm/dt: add basic mx51 device tree support
   arm/dt: add very basic dts file for babbage board


This is clearly based on the initial version I wrote. Can you give me 
credit for it.



   serial/imx: parse from device tree support


Jeremy Kerr wrote the initial version of this although it is quite 
heavily changed.


Original versions are here:

http://kernel.ubuntu.com/git?p=jk/dt/linux-2.6.git;a=shortlog;h=refs/heads/mx51

Rob

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v2] device/linaro/beagleboard: Install 0xbench native applications

2011-02-18 Thread Jeremy Chang
Signed-off-by: Jeremy Chang 
---
 ZeroXBenchmark.mk |   96 +
 beagleboard.mk|6 +++-
 2 files changed, 101 insertions(+), 1 deletions(-)
 create mode 100644 ZeroXBenchmark.mk

diff --git a/ZeroXBenchmark.mk b/ZeroXBenchmark.mk
new file mode 100644
index 000..e78047d
--- /dev/null
+++ b/ZeroXBenchmark.mk
@@ -0,0 +1,96 @@
+UNIXBENCH_BENCH_APPS := \
+bench_ubench_hanoi  \
+bench_ubench_syscall\
+bench_ubench_context1   \
+bench_ubench_pipe   \
+bench_ubench_spawn  \
+bench_ubench_execl  \
+bench_ubench_looper \
+bench_ubench_fstime \
+bench_ubench_arithoh\
+bench_ubench_register   \
+bench_ubench_short  \
+bench_ubench_int\
+bench_ubench_long   \
+bench_ubench_float  \
+bench_ubench_double \
+bench_ubench_dhry2  \
+bench_ubench_dhry2reg   \
+bench_ubench_whetstone-double
+
+LIBMICRO_BENCH_APPS :=  \
+bench_getpid\
+bench_bind  \
+bench_cascade_mutex \
+bench_cascade_fcntl \
+bench_cascade_flock \
+bench_chdir \
+bench_close \
+bench_close_tcp \
+bench_connection\
+bench_dup   \
+bench_exec  \
+bench_exit  \
+bench_exp   \
+bench_fcntl \
+bench_fcntl_ndelay  \
+bench_file_lock \
+bench_fork  \
+bench_getenv\
+bench_gettimeofday  \
+bench_getpeername   \
+bench_getrusage \
+bench_getsockname   \
+bench_isatty\
+bench_listen\
+bench_localtime_r   \
+bench_log   \
+bench_longjmp   \
+bench_lrand48   \
+bench_lseek \
+bench_malloc\
+bench_memcpy\
+bench_memmove   \
+bench_memrand   \
+bench_memset\
+bench_mktime\
+bench_mprotect  \
+bench_mmap  \
+bench_msync \
+bench_munmap\
+bench_mutex \
+bench_nop   \
+bench_open  \
+bench_pipe  \
+bench_poll  \
+bench_pread \
+bench_pthread_create\
+bench_pwrite\
+bench_read  \
+bench_realpath  \
+bench_recurse   \
+bench_select\
+bench_setsockopt\
+bench_sigaction \
+bench_siglongjmp\
+bench_signal\
+bench_sigprocmask   \
+bench_socket\
+bench_socketpair\
+bench_stat  \
+bench_strcasecmp\
+bench_strchr\
+bench_strcmp\
+bench_strcpy\
+bench_strftime  \
+bench_strlen\
+bench_strtol\
+bench_system\
+bench_time  \
+bench_times \
+bench_write \
+bench_writev
+
+ZEROXBENCHMARK_NATIVE_APPS :=   \
+$(UNIXBENCH_BENCH_APPS) \
+$(LIBMICRO_BENCH_APPS)
diff --git a/beagleboard.mk b/beagleboard.mk
index c10e0fa..f810f36 100644
--- a/beagleboard.mk
+++ b/beagleboard.mk
@@ -1,5 +1,7 @@
 # The beagleboard product that is specialized for beagleboard.

+include $(LOCAL_PATH)/ZeroXBenchmark.mk
+
 PRODUCT_PACKAGES := \
 ZeroXBenchmark \
 libmicro \
@@ -22,7 +24,9 @@ PRODUCT_PACKAGES := \
 Sync \
 Updater \
 CalendarProvider \
-SyncProvider
+SyncProvider \
+$(ZEROXBENCHMARK_NATIVE_APPS)
+

 $(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)

-- 
1.7.1

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v2] device/linaro/beagleboard: Setup network environment during booting

2011-02-18 Thread Jeremy Chang
Try to enable network interface and fetch IP via DHCP in boot script.

This will give the network interface a shot to fetch IP via DHCP.

Signed-off-by: Jeremy Chang 
---
 init.omap3.sh |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/init.omap3.sh b/init.omap3.sh
index 997ee03..a740236 100755
--- a/init.omap3.sh
+++ b/init.omap3.sh
@@ -15,3 +15,5 @@ do
 ;;
 esac
 done < /proc/cpuinfo
+
+netcfg usb0 dhcp
-- 
1.7.1

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v2] device/linaro/beagleboard: Make adbd listen on network interface

2011-02-18 Thread Jeremy Chang
adbd depends on this property to be capable of listening on network so that adb
can connect to the device through network. Without this property set, adbd will
only try to listen on the alternative usb gadget interface when it starts.

Set the property 'service.adb.tcp.port' to the default port  which
is defined in
DEFAULT_ADB_LOCAL_TRANSPORT_PORT of file system/core/adb/adb.h

Signed-off-by: Jeremy Chang 
---
 init.rc |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/init.rc b/init.rc
index b6a92c5..50d2dc6 100644
--- a/init.rc
+++ b/init.rc
@@ -181,6 +181,7 @@ on boot
 ifup lo
 hostname localhost
 domainname localdomain
+setprop service.adb.tcp.port 

 # set RLIMIT_NICE to allow priorities from 19 to -20
 setrlimit 13 40 40
-- 
1.7.1

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH] device/linaro/beagleboard: Enable Android TLS for beagleboard

2011-02-18 Thread Jeremy Chang
The OMAP3530 processor on Beagleboard is ARMv7 architecture that has hardware
TLS (Thread Local Storage). Enable TLS.

Signed-off-by: Jeremy Chang 
---
 BoardConfig.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/BoardConfig.mk b/BoardConfig.mk
index f05973e..f0703c7 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -19,7 +19,7 @@ TARGET_CPU_ABI2 := armeabi

 # Enable NEON feature
 TARGET_ARCH_VARIANT := armv7-a-neon
-ARCH_ARM_HAVE_TLS_REGISTER := false
+ARCH_ARM_HAVE_TLS_REGISTER := true

 EXTRA_PACKAGE_MANAGEMENT := false
 ALLOW_LGPL := true
-- 
1.7.1

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH v2] device/linaro/pandaboard: Install 0xbench native applications

2011-02-18 Thread Jeremy Chang
Signed-off-by: Jeremy Chang 
---
 ZeroXBenchmark.mk |   96 +
 pandaboard.mk |5 ++-
 2 files changed, 100 insertions(+), 1 deletions(-)
 create mode 100644 ZeroXBenchmark.mk

diff --git a/ZeroXBenchmark.mk b/ZeroXBenchmark.mk
new file mode 100644
index 000..e78047d
--- /dev/null
+++ b/ZeroXBenchmark.mk
@@ -0,0 +1,96 @@
+UNIXBENCH_BENCH_APPS := \
+bench_ubench_hanoi  \
+bench_ubench_syscall\
+bench_ubench_context1   \
+bench_ubench_pipe   \
+bench_ubench_spawn  \
+bench_ubench_execl  \
+bench_ubench_looper \
+bench_ubench_fstime \
+bench_ubench_arithoh\
+bench_ubench_register   \
+bench_ubench_short  \
+bench_ubench_int\
+bench_ubench_long   \
+bench_ubench_float  \
+bench_ubench_double \
+bench_ubench_dhry2  \
+bench_ubench_dhry2reg   \
+bench_ubench_whetstone-double
+
+LIBMICRO_BENCH_APPS :=  \
+bench_getpid\
+bench_bind  \
+bench_cascade_mutex \
+bench_cascade_fcntl \
+bench_cascade_flock \
+bench_chdir \
+bench_close \
+bench_close_tcp \
+bench_connection\
+bench_dup   \
+bench_exec  \
+bench_exit  \
+bench_exp   \
+bench_fcntl \
+bench_fcntl_ndelay  \
+bench_file_lock \
+bench_fork  \
+bench_getenv\
+bench_gettimeofday  \
+bench_getpeername   \
+bench_getrusage \
+bench_getsockname   \
+bench_isatty\
+bench_listen\
+bench_localtime_r   \
+bench_log   \
+bench_longjmp   \
+bench_lrand48   \
+bench_lseek \
+bench_malloc\
+bench_memcpy\
+bench_memmove   \
+bench_memrand   \
+bench_memset\
+bench_mktime\
+bench_mprotect  \
+bench_mmap  \
+bench_msync \
+bench_munmap\
+bench_mutex \
+bench_nop   \
+bench_open  \
+bench_pipe  \
+bench_poll  \
+bench_pread \
+bench_pthread_create\
+bench_pwrite\
+bench_read  \
+bench_realpath  \
+bench_recurse   \
+bench_select\
+bench_setsockopt\
+bench_sigaction \
+bench_siglongjmp\
+bench_signal\
+bench_sigprocmask   \
+bench_socket\
+bench_socketpair\
+bench_stat  \
+bench_strcasecmp\
+bench_strchr\
+bench_strcmp\
+bench_strcpy\
+bench_strftime  \
+bench_strlen\
+bench_strtol\
+bench_system\
+bench_time  \
+bench_times \
+bench_write \
+bench_writev
+
+ZEROXBENCHMARK_NATIVE_APPS :=   \
+$(UNIXBENCH_BENCH_APPS) \
+$(LIBMICRO_BENCH_APPS)
diff --git a/pandaboard.mk b/pandaboard.mk
index 2aca6a5..b7aab1c 100644
--- a/pandaboard.mk
+++ b/pandaboard.mk
@@ -1,5 +1,7 @@
 # The pandaboard product that is specialized for pandaboard.

+include $(LOCAL_PATH)/ZeroXBenchmark.mk
+
 PRODUCT_PACKAGES := \
 ZeroXBenchmark \
 libmicro \
@@ -22,7 +24,8 @@ PRODUCT_PACKAGES := \
 Sync \
 Updater \
 CalendarProvider \
-SyncProvider
+SyncProvider \
+$(ZEROXBENCHMARK_NATIVE_APPS)

 $(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)

-- 
1.7.1

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[PATCH] device/linaro/pandaboard: Enable Android TLS for pandaboard

2011-02-18 Thread Jeremy Chang
The OMAP4430 processor on Pandaboard is ARMv7 architecture that has hardware
TLS (Thread Local Storage). Enable TLS.

Signed-off-by: Jeremy Chang 
---
 BoardConfig.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/BoardConfig.mk b/BoardConfig.mk
index d77507e..76c2577 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -19,7 +19,7 @@ TARGET_CPU_ABI2 := armeabi

 # Enable NEON feature
 TARGET_ARCH_VARIANT := armv7-a-neon
-ARCH_ARM_HAVE_TLS_REGISTER := false
+ARCH_ARM_HAVE_TLS_REGISTER := true

 EXTRA_PACKAGE_MANAGEMENT := false
 ALLOW_LGPL := true
-- 
1.7.1

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v2] device/linaro/beagleboard: Setup network environment during booting

2011-02-18 Thread Jim Huang
2011/2/18 Jeremy Chang :
> Try to enable network interface and fetch IP via DHCP in boot script.
>
> This will give the network interface a shot to fetch IP via DHCP.

To be precise, this patch works with Beagleboard-xM only.

> --- a/init.omap3.sh
> +++ b/init.omap3.sh
> @@ -15,3 +15,5 @@ do
>             ;;
>     esac
>  done < /proc/cpuinfo
> +
> +netcfg usb0 dhcp

Beagleboard xM has one Ethernet port connected over USB, and the
driver model makes it usable
as a normal network device on device node, usb0. (Ethernet support for USB )

That is the reason why "usb0" is here.

Sincerely,
Jim Huang (jserv)
http://0xlab.org/

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Notes & Actions: 2/16 Linaro Developer Platform Weekly Status Meeting

2011-02-18 Thread Tom Gall
Enclosed you'll find a link to the agenda, notes and actions from the
Linaro Developer Platforms Weekly Status meeting held on February 16th
in #linaro-meeting on irc.freenode.net at 16:00 UTC.

https://wiki.linaro.org/Platform/Foundations/2011-02-16

Actions from the meeting where as follows:

 *  slangasek, JamieBennett to shake the tree for developer image testing
 *  slangasek to prod archive admins about rejected kernels

Regards,
Tom (tgall_foo)
Developer Platforms Team

"We want great men who, when fortune frowns will not be discouraged."
- Colonel Henry Knox
w) tom.gall att linaro.org
w) tom_gall att vnet.ibm.com
h) tom_gall att mac.com

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v2] device/linaro/beagleboard: Setup network environment during booting

2011-02-18 Thread Alexander Sack
On Fri, Feb 18, 2011 at 4:42 PM, Jim Huang  wrote:
> 2011/2/18 Jeremy Chang :
>> Try to enable network interface and fetch IP via DHCP in boot script.
>>
>> This will give the network interface a shot to fetch IP via DHCP.
>
> To be precise, this patch works with Beagleboard-xM only.
>
>> --- a/init.omap3.sh
>> +++ b/init.omap3.sh
>> @@ -15,3 +15,5 @@ do
>>             ;;
>>     esac
>>  done < /proc/cpuinfo
>> +
>> +netcfg usb0 dhcp
>
> Beagleboard xM has one Ethernet port connected over USB, and the
> driver model makes it usable
> as a normal network device on device node, usb0. (Ethernet support for USB )
>
> That is the reason why "usb0" is here.

is this fatal for beagle C4? maybe we can make this gracefully fail
and if you plug in a USBNET device it starts working?

-- 

 - Alexander

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH v2] device/linaro/beagleboard: Setup network environment during booting

2011-02-18 Thread Jim Huang
2011/2/19 Alexander Sack :
> On Fri, Feb 18, 2011 at 4:42 PM, Jim Huang  wrote:
[...]
>> To be precise, this patch works with Beagleboard-xM only.
>> Beagleboard xM has one Ethernet port connected over USB, and the
>> driver model makes it usable
>> as a normal network device on device node, usb0. (Ethernet support for USB )
>>
>> That is the reason why "usb0" is here.
>
> is this fatal for beagle C4? maybe we can make this gracefully fail
> and if you plug in a USBNET device it starts working?

hi Alexander,

For Beagleboard C4, file  init.omap3.sh _could_ be the same once you
already set up USB
networking in host side.  However, it is hard to assume every desktop
host provides DHCP
server.

Instead, people might expect to configure usbnet IP address manually.
I think there is no
technical problem of Jeremy's patch, and I just care about the usability.

Sincerely,
Jim Huang (jserv)
http://0xlab.org/

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [st-ericsson] v4l2 vs omx for camera

2011-02-18 Thread Robert Fekete
 Hi,

In order to expand this knowledge outside of Linaro I took the Liberty of
inviting both linux-me...@vger.kernel.org and
gstreamer-de...@lists.freedesktop.org. For any newcomer I really recommend
to do some catch-up reading on
http://lists.linaro.org/pipermail/linaro-dev/2011-February/thread.html("v4l2
vs omx for camera" thread) before making any comments. And sign up
for Linaro-dev while you are at it :-)

To make a long story short:
Different vendors provide custom OpenMax solutions for say Camera/ISP. In
the Linux eco-system there is V4L2 doing much of this work already and is
evolving with mediacontroller as well. Then there is the integration in
Gstreamer...Which solution is the best way forward. Current discussions so
far puts V4L2 greatly in favor of OMX.
Please have in mind that OpenMAX as a concept is more like GStreamer in many
senses. The question is whether Camera drivers should have OMX or V4L2 as
the driver front end? This may perhaps apply to video codecs as well. Then
there is how to in best of ways make use of this in GStreamer in order to
achieve no copy highly efficient multimedia pipelines. Is gst-omx the way
forward?

Let the discussion continue...


On 17 February 2011 14:48, Laurent Pinchart <
laurent.pinch...@ideasonboard.com> wrote:

> On Thursday 10 February 2011 08:47:15 Hans Verkuil wrote:
> > On Thursday, February 10, 2011 08:17:31 Linus Walleij wrote:
> > > On Wed, Feb 9, 2011 at 8:44 PM, Harald Gustafsson wrote:
> > > > OMX main purpose is to handle multimedia hardware and offer an
> > > > interface to that HW that looks identical indenpendent of the vendor
> > > > delivering that hardware, much like the v4l2 or USB subsystems tries
> to
> > > > do. And yes optimally it should be implemented in drivers/omx in
> Linux
> > > > and a user space library on top of that.
> > >
> > > Thanks for clarifying this part, it was unclear to me. The reason being
> > > that it seems OMX does not imply userspace/kernelspace separation, and
> > > I was thinking more of it as a userspace lib. Now my understanding is
> > > that if e.g. OpenMAX defines a certain data structure, say for a PCM
> > > frame or whatever, then that exact struct is supposed to be used by the
> > > kernelspace/userspace interface, and defined in the include file
> exported
> > > by the kernel.
> > >
> > > > It might be that some alignment also needs to be made between 4vl2
> and
> > > > other OS's implementation, to ease developing drivers for many OSs
> > > > (sorry I don't know these details, but you ST-E guys should know).
> > >
> > > The basic conflict I would say is that Linux has its own API+ABI, which
> > > is defined by V4L and ALSA through a community process without much
> > > thought about any existing standard APIs. (In some cases also predating
> > > them.)
> > >
> > > > By the way IL is about to finalize version 1.2 of OpenMAX IL which is
> > > > more than a years work of aligning all vendors and fixing unclear and
> > > > buggy parts.
> > >
> > > I suspect that the basic problem with Khronos OpenMAX right now is
> > > how to handle communities - for example the X consortium had
> > > something like the same problem a while back, only member companies
> > > could partake in the standard process, and they need of course to pay
> > > an upfront fee for that, and the majority of these companies didn't
> > > exactly send Linux community members to the meetings.
> > >
> > > And now all the companies who took part in OpenMAX somehow
> > > end up having to do a lot of upfront community work if they want
> > > to drive the API:s in a certain direction, discuss it again with the
> V4L
> > > and ALSA maintainers and so on. Which takes a lot of time and
> > > patience with uncertain outcome, since this process is autonomous
> > > from Khronos. Nobody seems to be doing this, I javen't seen a single
> > > patch aimed at trying to unify the APIs so far. I don't know if it'd be
> > > welcome.
> > >
> > > This coupled with strict delivery deadlines and a marketing will
> > > to state conformance to OpenMAX of course leads companies into
> > > solutions breaking the Linux kernelspace API to be able to present
> > > this.
>
> From my experience with OMX, one of the issues is that companies usually
> extend the API to fullfill their platform's needs, without going through
> any
> standardization process. Coupled with the lack of open and free reference
> implementation and test tools, this more or less means that OMX
> implementations are not really compatible with eachother, making OMX-based
> solution not better than proprietary solutions.
>
> > > Now I think we have a pretty clear view of the problem, I don't
> > > know what could be done about it though :-/
> >
> > One option might be to create a OMX wrapper library around the V4L2 API.
> > Something similar is already available for the old V4L1 API (now removed
> > from the kernel) that allows apps that still speak V4L1 only to use the
> > V4L2 API. This is done in 

[PATCH] PulseAudio: added IT block to fix thumb conditional instruction build error messages

2011-02-18 Thread Kurt Taylor
From: Kurt Taylor 
Date: Fri, 18 Feb 2011 14:30:03 +
Subject: [PATCH] PulseAudio: added IT block to fix thumb conditional
instruction build error messages

---
 src/pulsecore/svolume_arm.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/pulsecore/svolume_arm.c b/src/pulsecore/svolume_arm.c
index 3973e51..a141ba1 100644
--- a/src/pulsecore/svolume_arm.c
+++ b/src/pulsecore/svolume_arm.c
@@ -39,7 +39,9 @@

 #define MOD_INC() \
 " subs  r0, r6, %2  \n\t" \
+" it cs \n\t" \
 " addcs r0, %1  \n\t" \
+" it cs \n\t" \
 " movcs r6, r0  \n\t"

 static void
-- 
1.7.2.3
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


[linaro-android][PATCH 1/2] Add virtual battery driver

2011-02-18 Thread sola
>From 7784102e184c134eaa11b5986f31c892748f1604 Mon Sep 17 00:00:00 2001
From: Masashi YOKOTA 
Date: Sat, 19 Feb 2011 02:40:56 +0900
Subject: [PATCH 1/2] Add virtual battery driver

This patch adds virtual battery driver.
This is based on
git://git.linaro.org/people/jstultz/linux.git dev/linaro.android

Signed-off-by: Masashi YOKOTA
Signed-off-by: Akihiro MAEDA 
---
 drivers/power/Kconfig   |5 +
 drivers/power/Makefile  |1 +
 drivers/power/virtual_battery.c |  349 +++
 3 files changed, 355 insertions(+), 0 deletions(-)
 create mode 100644 drivers/power/virtual_battery.c

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 60d83d9..7258bc9 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -185,4 +185,9 @@ config CHARGER_TWL4030
help
  Say Y here to enable support for TWL4030 Battery Charge Interface.

+config BATTERY_VIRTUAL
+   tristate "Virtual Battery Driver"
+   help
+ Say Y to include support for Virtual Battery.
+
 endif # POWER_SUPPLY
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index c75772e..71f8b36 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -32,3 +32,4 @@ obj-$(CONFIG_BATTERY_JZ4740)  += jz4740-battery.o
 obj-$(CONFIG_BATTERY_INTEL_MID)+= intel_mid_battery.o
 obj-$(CONFIG_CHARGER_ISP1704)  += isp1704_charger.o
 obj-$(CONFIG_CHARGER_TWL4030)  += twl4030_charger.o
+obj-$(CONFIG_BATTERY_VIRTUAL)  += virtual_battery.o
diff --git a/drivers/power/virtual_battery.c b/drivers/power/virtual_battery.c
new file mode 100644
index 000..9e455ad
--- /dev/null
+++ b/drivers/power/virtual_battery.c
@@ -0,0 +1,349 @@
+/*
+ * drivers/power/virtual_battery.c
+ *
+ * Virtual battery driver
+ *
+ * Copyright (C) 2008 Pylone, Inc.
+ * Author: Masashi YOKOTA 
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+
+/* module parameters */
+static int ac_status= 1; /* online */
+static int battery_status   = POWER_SUPPLY_STATUS_CHARGING;
+static int battery_health   = POWER_SUPPLY_HEALTH_GOOD;
+static int battery_present  = 1; /* true */
+static int battery_technology   = POWER_SUPPLY_TECHNOLOGY_LION;
+static int battery_capacity = 50;
+
+
+static struct platform_device *bat_pdev;
+
+static enum power_supply_property virtual_ac_props[] = {
+   POWER_SUPPLY_PROP_ONLINE,
+};
+
+static enum power_supply_property virtual_battery_props[] = {
+   POWER_SUPPLY_PROP_STATUS,
+   POWER_SUPPLY_PROP_HEALTH,
+   POWER_SUPPLY_PROP_PRESENT,
+   POWER_SUPPLY_PROP_TECHNOLOGY,
+   POWER_SUPPLY_PROP_CAPACITY,
+};
+
+static int virtual_ac_get_property(struct power_supply *psy,
+  enum power_supply_property psp,
+  union power_supply_propval *val)
+{
+   int ret = 0;
+
+   dev_dbg(&bat_pdev->dev, "%s: psp=%d\n", __func__, psp);
+   switch (psp) {
+   case POWER_SUPPLY_PROP_ONLINE:
+   val->intval = ac_status;
+   break;
+   default:
+   ret = -EINVAL;
+   break;
+   }
+   return ret;
+}
+
+static int virtual_battery_get_property(struct power_supply *psy,
+   enum power_supply_property psp,
+   union power_supply_propval *val)
+{
+   int ret = 0;
+
+   dev_dbg(&bat_pdev->dev, "%s: psp=%d\n", __func__, psp);
+   switch (psp) {
+   case POWER_SUPPLY_PROP_STATUS:
+   val->intval = battery_status;
+   break;
+   case POWER_SUPPLY_PROP_HEALTH:
+   val->intval = battery_health;
+   break;
+   case POWER_SUPPLY_PROP_PRESENT:
+   val->intval = battery_present;
+   break;
+   case POWER_SUPPLY_PROP_TECHNOLOGY:
+   val->intval = battery_technology;
+   break;
+   case POWER_SUPPLY_PROP_CAPACITY:
+   val->intval = battery_capacity;
+   break; default: ret = -EINVAL;
+   break;
+   }
+
+   return ret;
+}
+
+static struct power_supply power_supply_ac = {
+   .properties = virtual_ac_props,
+   .num_properties = ARRAY_SIZE(virtual_ac_props),
+   .get_property = virtual_ac_get_property,
+   .name = "ac",
+   .type = POWER_SUPPLY_TYPE_MAINS,
+};
+
+static struct power_supply power_supply_bat = {
+   .properties = virtual_batter

[linaro-android][PATCH 2/2] virtual battery driver changed for linux kernel 2.6.37 or later

2011-02-18 Thread sola
>From 8eab2223b35024e56fd8868626b2fc1958eada47 Mon Sep 17 00:00:00 2001
From: Akihiro MAEDA 
Date: Sat, 19 Feb 2011 02:44:31 +0900
Subject: [PATCH 2/2] virtual battery driver changed for linux kernel
2.6.37 or later

This patch is virtual battery driver changed for linux kernel 2.6.37 or later.
This is based on
git://git.linaro.org/people/jstultz/linux.git dev/linaro.android

Signed-off-by: Akihiro MAEDA 
---
 drivers/power/virtual_battery.c |   53 ++
 1 files changed, 42 insertions(+), 11 deletions(-)

diff --git a/drivers/power/virtual_battery.c b/drivers/power/virtual_battery.c
index 9e455ad..e4fa9e5 100644
--- a/drivers/power/virtual_battery.c
+++ b/drivers/power/virtual_battery.c
@@ -5,6 +5,7 @@
  *
  * Copyright (C) 2008 Pylone, Inc.
  * Author: Masashi YOKOTA 
+ * Modified by: Akihiro MAEDA 
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -190,7 +191,7 @@ static const char * map_get_key(struct
battery_property_map * map, int value, co
return def_key;
 }

-static int param_set_ac_status(const char *key, struct kernel_param *kp)
+static int param_set_ac_status(const char *key, const struct kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s, key=%s\n", __func__, kp->name, 
key);
ac_status = map_get_value( map_ac_online, key, ac_status);
@@ -198,14 +199,14 @@ static int param_set_ac_status(const char *key,
struct kernel_param *kp)
return 0;
 }

-static int param_get_ac_status(char *buffer, struct kernel_param *kp)
+static int param_get_ac_status(char *buffer, const struct kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s\n", __func__, kp->name);
strcpy(buffer, map_get_key( map_ac_online, ac_status, "unknown"));
return strlen(buffer);
 }

-static int param_set_battery_status(const char *key, struct kernel_param *kp)
+static int param_set_battery_status(const char *key, const struct
kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s, key=%s.\n", __func__, kp->name, 
key);
battery_status = map_get_value( map_status, key, battery_status);
@@ -213,14 +214,14 @@ static int param_set_battery_status(const char
*key, struct kernel_param *kp)
return 0;
 }

-static int param_get_battery_status(char *buffer, struct kernel_param *kp)
+static int param_get_battery_status(char *buffer, const struct
kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s\n", __func__, kp->name);
strcpy(buffer, map_get_key( map_status, battery_status, "unknown"));
return strlen(buffer);
 }

-static int param_set_battery_health(const char *key, struct kernel_param *kp)
+static int param_set_battery_health(const char *key, const struct
kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s, key=%s\n", __func__, kp->name, 
key);
battery_health = map_get_value( map_health, key, battery_health);
@@ -228,14 +229,14 @@ static int param_set_battery_health(const char
*key, struct kernel_param *kp)
return 0;
 }

-static int param_get_battery_health(char *buffer, struct kernel_param *kp)
+static int param_get_battery_health(char *buffer, const struct
kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s\n", __func__, kp->name);
strcpy(buffer, map_get_key( map_health, battery_health, "unknown"));
return strlen(buffer);
 }

-static int param_set_battery_present(const char *key, struct kernel_param *kp)
+static int param_set_battery_present(const char *key, const struct
kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s, key=%s\n", __func__, kp->name, 
key);
battery_present = map_get_value( map_present, key, battery_present);
@@ -243,14 +244,14 @@ static int param_set_battery_present(const char
*key, struct kernel_param *kp)
return 0;
 }

-static int param_get_battery_present(char *buffer, struct kernel_param *kp)
+static int param_get_battery_present(char *buffer, const struct
kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s\n", __func__, kp->name);
strcpy(buffer, map_get_key( map_present, battery_present, "unknown"));
return strlen(buffer);
 }

-static int param_set_battery_technology(const char *key, struct
kernel_param *kp)
+static int param_set_battery_technology(const char *key, const struct
kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s, key=%s\n", __func__, kp->name, 
key);
battery_technology = map_get_value( map_technology, key, 
battery_technology);
@@ -258,14 +259,14 @@ static int param_set_battery_technology(const
char *key, struct kernel_param *kp
return 0;
 }

-static int param_get_battery_technology(char *buffer, struct kernel_param *kp)
+static int param_get_battery_technology(char *buffer, const struct
kernel_param *kp)
 {
dev_dbg(&bat_pdev->dev, "%s: name=%s\n", __func__, kp->name);
strcpy(buffer, map_g

Re: [PATCH v2] device/linaro/beagleboard: Setup network environment during booting

2011-02-18 Thread Alexander Sack
On Fri, Feb 18, 2011 at 5:15 PM, Jim Huang  wrote:
> 2011/2/19 Alexander Sack :
>> On Fri, Feb 18, 2011 at 4:42 PM, Jim Huang  wrote:
> [...]
>>> To be precise, this patch works with Beagleboard-xM only.
>>> Beagleboard xM has one Ethernet port connected over USB, and the
>>> driver model makes it usable
>>> as a normal network device on device node, usb0. (Ethernet support for USB )
>>>
>>> That is the reason why "usb0" is here.
>>
>> is this fatal for beagle C4? maybe we can make this gracefully fail
>> and if you plug in a USBNET device it starts working?
>
> hi Alexander,
>
> For Beagleboard C4, file  init.omap3.sh _could_ be the same once you
> already set up USB
> networking in host side.  However, it is hard to assume every desktop
> host provides DHCP
> server.
>
> Instead, people might expect to configure usbnet IP address manually.
> I think there is no
> technical problem of Jeremy's patch, and I just care about the usability.

I think I used the wrong wording. What I really meant was whether

 a) this patch causes problems on boot if there is no network device
attached to beagleboard
 b) would it start working if I plug in a USB LAN adapter to my beagleboard ;).

-- 

 - Alexander

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [linaro-android][PATCH 1/2] Add virtual battery driver

2011-02-18 Thread john stultz
On Sat, 2011-02-19 at 02:54 +0900, sola wrote:
> From 7784102e184c134eaa11b5986f31c892748f1604 Mon Sep 17 00:00:00 2001
> From: Masashi YOKOTA 
> Date: Sat, 19 Feb 2011 02:40:56 +0900
> Subject: [PATCH 1/2] Add virtual battery driver
> 
> This patch adds virtual battery driver.
> This is based on
> git://git.linaro.org/people/jstultz/linux.git dev/linaro.android
> 
> Signed-off-by: Masashi YOKOTA
> Signed-off-by: Akihiro MAEDA 

This looks pretty good! 

Although I have one more concern: Since it wasn't in the last version of
the patch, did you add Masashi YOKOTA's signed-off-by line?  If the
original patch did not have his signed-off by line, you should not add
it (and from my searching, it doesn't seem like it was originally made
available as a patch, but as a driver tarball).

Also, just to be clear about what the "Signed-off-by" means, you might
want to review the "Developer's Certificate of Origin" section found
under the "Sign your work" section of Documentation/SubmittingPatches.

While not required by the GPL, as a courtesy you may want to bring
Masashi YOKOTA into the discussion by CC'ing him the next time you
submit this patch (as well as on your changes).

So re-submit the patch one more time after you have done the above, and
I should be able to merge it.

thanks
-john



___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


cross-compile issue for overo

2011-02-18 Thread Andy Doan
I just hit an issue cross-compiling the linux-linaro-2.6.37.git source.
I'm seeing errors for arch/arm/mach-omap2/sleep34xx.S like:

 Error: selected processor does not support ARM mode `smc #1'

It appears to be related to commit:

 98be69a ARM: omap3: Remove hand-encoded SMC instructions

After doing a little searching, I stumbled across something similar from
John Rigby:

 http://marc.info/?l=linux-omap&m=129118316614865&w=2

I "fixed" the problem on my system with this patch:

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index f6614a6..985bc89 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -68,7 +68,7 @@ obj-$(CONFIG_OMAP_SMARTREFLEX)  += sr_device.o
smartre
 obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3)  += smartreflex-class3.o

 AFLAGS_sleep24xx.o :=-Wa,-march=armv6
-AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a
+AFLAGS_sleep34xx.o :=-Wa,-march=armv7-a$(plus_sec)

 ifeq ($(CONFIG_PM_VERBOSE),y)
 CFLAGS_pm_bus.o+= -DDEBUG

My question: Is this patch actually needed for cross-compiling our
kernel, or is there some additional argument I need to pass to Make when
building my kernel?

FYI - My current command line looks like:
 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- O=out V=1 uImage modules

-andy

___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev