[PATCH 1/3] powertop: Disable pci bus measurement for arm platforms
This patch disables pci related measurement which is not needed for ARM platforms and also library libpci is not needed. Signed-off-by: Amit Daniel Kachhap --- Android.mk |7 ++- devices/runtime_pm.cpp |3 ++- lib.cpp|7 --- main.cpp |6 ++ tuning/runtime.cpp |2 ++ 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Android.mk b/Android.mk index 146f57a..6948011 100644 --- a/Android.mk +++ b/Android.mk @@ -4,7 +4,6 @@ include $(CLEAR_VARS) LOCAL_MODULE_TAGS := debug LOCAL_SHARED_LIBRARIES := libstlport \ libnl \ - libpci \ LOCAL_MODULE := powertop @@ -14,6 +13,12 @@ LOCAL_CPPFLAGS += -DDISABLE_NCURSES -DDISABLE_I18N -DDISABLE_TRYCATCH LOCAL_C_INCLUDES += external/stlport/stlport/ external/stlport/stlport/stl external/stlport/stlport/using/h/ bionic external/libnl/include/ +ifneq ($(TARGET_ARCH),arm) +LOCAL_SHARED_LIBRARIES += libpci +else #TARGET_ARCH != arm +LOCAL_CPPFLAGS += -DDISABLE_PCI +endif #TARGET_ARCH == arm + LOCAL_SRC_FILES += \ parameters/parameters.cpp \ parameters/persistent.cpp \ diff --git a/devices/runtime_pm.cpp b/devices/runtime_pm.cpp index 368d995..5a55426 100644 --- a/devices/runtime_pm.cpp +++ b/devices/runtime_pm.cpp @@ -200,7 +200,7 @@ static void do_bus(const char *bus) continue; dev = new class runtime_pmdevice(entry->d_name, filename); - +#ifndef DISABLE_PCI if (strcmp(bus, "pci") == 0) { uint16_t vendor = 0, device = 0; @@ -226,6 +226,7 @@ static void do_bus(const char *bus) dev->set_human_name(devname); } } +#endif//DISABLE_PCI all_devices.push_back(dev); } closedir(dir); diff --git a/lib.cpp b/lib.cpp index e6684b0..d058e4f 100644 --- a/lib.cpp +++ b/lib.cpp @@ -35,10 +35,11 @@ #include #include #include - +#ifndef DISABLE_PCI extern "C" { #include } +#endif #include "lib.h" @@ -243,7 +244,7 @@ void format_watts(double W, char *buffer, unsigned int len) #endif } - +#ifndef DISABLE_PCI static struct pci_access *pci_access; char *pci_id_to_name(uint16_t vendor, uint16_t device, char *buffer, int len) @@ -267,7 +268,7 @@ void end_pci_access(void) if (pci_access) pci_free_name_list(pci_access); } - +#endif //DISABLE_PCI int utf_ok = -1; diff --git a/main.cpp b/main.cpp index 4241d44..3ee0a7e 100644 --- a/main.cpp +++ b/main.cpp @@ -261,7 +261,9 @@ void html_report(int time, bool file) learn_parameters(50, 0); save_all_results("saved_results.powertop"); save_parameters("saved_parameters.powertop"); +#ifndef DISABLE_PCI end_pci_access(); +#endif exit(0); } @@ -370,7 +372,9 @@ int main(int argc, char **argv) if (debug_learning) { learn_parameters(1000, 1); dump_parameter_bundle(); +#ifndef DISABLE_PCI end_pci_access(); +#endif exit(0); } @@ -404,7 +408,9 @@ int main(int argc, char **argv) save_parameters("saved_parameters.powertop"); learn_parameters(500, 0); save_parameters("saved_parameters.powertop"); +#ifndef DISABLE_PCI end_pci_access(); +#endif reset_display(); return 0; diff --git a/tuning/runtime.cpp b/tuning/runtime.cpp index 03cfa0b..a543b41 100644 --- a/tuning/runtime.cpp +++ b/tuning/runtime.cpp @@ -48,6 +48,7 @@ runtime_tunable::runtime_tunable(const char *path, const char *bus, const char * if (!device_has_runtime_pm(path)) sprintf(desc, _("%s device %s has no runtime power management"), bus, dev); +#ifndef DISABLE_PCI if (strcmp(bus, "pci") == 0) { char filename[4096]; uint16_t vendor = 0, device = 0; @@ -77,6 +78,7 @@ runtime_tunable::runtime_tunable(const char *path, const char *bus, const char * } +#endif//DISABLE_PCI } int runtime_tunable::good_bad(void) -- 1.7.4.1 ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
[PATCH 3/3] powertop: ncurses: Enable ncurses for android and miscellaneous changes
This patch enables ncurses for android. NCURSES_NOMACRO flag is enabled as there is some conflict with stl libraries. Signed-off-by: Amit Daniel Kachhap --- Android.mk | 23 +++ display.cpp|5 - display.h |3 ++- lib.cpp|6 -- main.cpp |5 + process/do_process.cpp |4 6 files changed, 38 insertions(+), 8 deletions(-) diff --git a/Android.mk b/Android.mk index 6948011..e6e73b1 100644 --- a/Android.mk +++ b/Android.mk @@ -1,17 +1,32 @@ LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := debug +LOCAL_MODULE_TAGS := optional LOCAL_SHARED_LIBRARIES := libstlport \ - libnl \ + libnl + +LOCAL_STATIC_LIBRARIES := libncurses LOCAL_MODULE := powertop #LOCAL_CFLAGS += -Wall -O2 -g -fno-omit-frame-pointer -fstack-protector -Wshadow -Wformat -D_FORTIFY_SOURCE=2 #LOCAL_CPPFLAGS += -Wall -O2 -g -fno-omit-frame-pointer -LOCAL_CPPFLAGS += -DDISABLE_NCURSES -DDISABLE_I18N -DDISABLE_TRYCATCH +LOCAL_CPPFLAGS += \ + -DDISABLE_I18N \ + -DDISABLE_TRYCATCH \ + -DNCURSES_NOMACROS \ + -DDISABLE_WSTRING \ + -DDEFAULT_TERM=\"xterm\" \ -LOCAL_C_INCLUDES += external/stlport/stlport/ external/stlport/stlport/stl external/stlport/stlport/using/h/ bionic external/libnl/include/ +LOCAL_C_INCLUDES += external/stlport/stlport/ \ + external/stlport/stlport/stl \ + external/stlport/stlport/using/h/ \ + bionic \ + external/libnl/include/ \ + external/ncurses \ + external/ncurses/lib \ + external/ncurses/include \ + external/ncurses/include/ncurses ifneq ($(TARGET_ARCH),arm) LOCAL_SHARED_LIBRARIES += libpci diff --git a/display.cpp b/display.cpp index f486050..283743c 100644 --- a/display.cpp +++ b/display.cpp @@ -84,8 +84,11 @@ void reset_display(void) keypad(stdscr, FALSE); echo(); nocbreak(); - +#ifndef NCURSES_NOMACROS resetterm(); +#else + reset_shell_mode(); +#endif } diff --git a/display.h b/display.h index 3b24914..023f68d 100644 --- a/display.h +++ b/display.h @@ -49,7 +49,8 @@ public: int cursor_pos; int cursor_max; WINDOW *win; - + + virtual ~tab_window() {}; virtual void cursor_down(void) { if (cursor_pos < cursor_max ) cursor_pos++; repaint(); } ; virtual void cursor_up(void) { if (cursor_pos > 0) cursor_pos--; repaint(); }; diff --git a/lib.cpp b/lib.cpp index d058e4f..86fcf96 100644 --- a/lib.cpp +++ b/lib.cpp @@ -238,10 +238,12 @@ void format_watts(double W, char *buffer, unsigned int len) if (W < 0.0001) sprintf(buffer, _("0 mW")); -#ifndef DISABLE_NCURSES +#ifndef DISABLE_NCURSES +#ifndef DISABLE_WSTRING while (mbstowcs(NULL,buffer,0) < len) strcat(buffer, " "); -#endif +#endif //DISABLE_WSTRING +#endif //DISABLE_NCURSES } #ifndef DISABLE_PCI diff --git a/main.cpp b/main.cpp index 3ee0a7e..fc4b0cf 100644 --- a/main.cpp +++ b/main.cpp @@ -280,6 +280,11 @@ int main(int argc, char **argv) bindtextdomain ("powertop", "/usr/share/locale"); textdomain ("powertop"); #endif + +#ifdef DEFAULT_TERM + if (!getenv("TERM")) + setenv("TERM", DEFAULT_TERM, 1); +#endif uid = getuid(); if (uid != 0) { diff --git a/process/do_process.cpp b/process/do_process.cpp index 5c382f1..7e39321 100644 --- a/process/do_process.cpp +++ b/process/do_process.cpp @@ -720,7 +720,9 @@ void process_update_display(void) if (!show_power) strcpy(power, " "); sprintf(name, "%s", all_power[i]->type()); +#ifndef DISABLE_WSTRING while (mbstowcs(NULL,name,0) < 14) strcat(name, " "); +#endif if (all_power[i]->events() == 0 && all_power[i]->usage() == 0 && all_power[i]->Witts() == 0) @@ -733,7 +735,9 @@ void process_update_display(void) else sprintf(usage, "%5i%s", (int)all_power[i]->usage(), all_power[i]->usage_units()); } +#ifndef DISABLE_WSTRING while (mbstowcs(NULL,usage,0) < 14) strcat(usage, " "); +#endif sprintf(events, "%5.1f", all_power[i]->events()); if (!all_power[i]->show_events()) events[0] = 0; -- 1.7.4.1 ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
[PATCH 0/3] powertop: Adding support for android.
The following set of patches add changes in powertop needed for arm android platforms. These patches depends on the below mentioned patches. http://www.mail-archive.com/power@bughost.org/msg02078.html Amit Daniel Kachhap (3): powertop: Disable pci bus measurement for arm platforms perf-event: Add defination of __NR_perf_event_open for arm platforms ncurses: Enable ncurses for android and miscellaneous changes Android.mk | 30 +- devices/runtime_pm.cpp |3 ++- display.cpp|5 - display.h |3 ++- lib.cpp| 13 - main.cpp | 11 +++ perf/perf_event.h |3 +++ process/do_process.cpp |4 tuning/runtime.cpp |2 ++ 9 files changed, 61 insertions(+), 13 deletions(-) -- 1.7.4.1 ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
[PATCH 2/3] powertop: perf-event: Add defination of __NR_perf_event_open for arm platforms
This patch adds defination for __NR_perf_event_open if not present for arm platforms. Signed-off-by: Amit Daniel Kachhap --- perf/perf_event.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/perf/perf_event.h b/perf/perf_event.h index 563ffc7..eac4a73 100644 --- a/perf/perf_event.h +++ b/perf/perf_event.h @@ -51,6 +51,9 @@ #if __x86_64__ #define __NR_perf_event_open 298 #endif +#if __arm__ +#define __NR_perf_event_open 364 +#endif #endif -- 1.7.4.1 ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATCH 1/1] Add ARM cpu topology definition
On Tue, 2011-07-12 at 18:23 +0300, Amit Kucheria wrote: > From: Vincent Guittot > > (Patch accepted by Russell for 3.1: > http://www.spinics.net/lists/arm-kernel/msg131273.html) > > The affinity between ARM processors is defined in the MPIDR register. > We can identify which processors are in the same cluster, > and which ones have performance interdependency. We can define the > cpu topology of ARM platform, that is then used by sched_mc and sched_smt. > > The default state of sched_mc and sched_smt config is disable. > When enabled, the behavior of the scheduler can be modified with > sched_mc_power_savings and sched_smt_power_savings sysfs interfaces. > > Changes since v4 : > * Remove unnecessary parentheses and blank lines > > Changes since v3 : > * Update the format of printk message > * Remove blank line > > Changes since v2 : > * Update the commit message and some comments > > Changes since v1 : > * Update the commit message > * Add read_cpuid_mpidr in arch/arm/include/asm/cputype.h > * Modify header of arch/arm/kernel/topology.c > * Modify tests and manipulation of MPIDR's bitfields > * Modify the place and dependancy of the config > * Modify Noop functions > > Signed-off-by: Vincent Guittot > Reviewed-by: Amit Kucheria > Signed-off-by: Amit Kucheria Don't have much feedback on the patch, but it applies and boots fine against the android-3.0 branch. I'll be happy to merge it once it lands in Nico's tree. thanks -john ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [U-Boot] [uboot PATCH v2] Add uboot "fdt_high" enviroment variable
On Thu, 2011-07-14 at 20:53 -0600, Grant Likely wrote: >You should have everything you need to fix it. If > CONFIG_SYS_BOOTMAPSZ is defined, then U-Boot will not use memory > larger that that for the dtb or atags. > > Right now CONFIG_SYS_BOOTMAPSZ is not set by default, but we could > default it to a sane value for ARM platforms. Which makes more sense, setting this or Scott's suggestion of reserving highmem to prevent it's use as is done in the powerpc's arch_lmb_reserve()? The latter would affect all ARM. Wouldn't BOOTMAP need to be set in each boards config file? On Thu, 2011-07-14 at 16:51 -0500, Scott Wood wrote: > Well, that does sound strange. I'd think it would be based on whether you > define CONFIG_SYS_BOOT_RAMDISK_HIGH, and whether initrd_high is set to > 0x. Same kernel, same u-boot, and initrd_high not set at all. This is the crux of the problem. The default changes when any FDT is provided. I think the difference may come from bootm_linux_fdt(). Rereading your earlier mail and looking at the code, we should probably do as you suggest and add logic to arch_lmb_reserve() to reserve highmem like powerpc does. I think the fdt_high patch is still a good idea though. It allows us to continue booting using lowest memory for the initrd and other startup data. > Or were you just not telling bootm about the ramdisk before, and letting > the kernel know about the address through some other means? We always provide a ramdisk address to bootm. The problem occurs when we add an FDT address. > So add a mechanism for the user to override if you can justify a use for > it, but the default should be allocated from an lmb that has had unusable > addresses excluded. Well, I do find it troubling I'm having to go to so much trouble to convince u-boot to continue to use this data directly from where we put it in the first place. > > > The user specified address might be in flash. > > > > But in our case it is not. > > It still needs to be supported. I can appreciate that, but the default behavior has changed. It's surprising. For the moment it breaks things (granted that it breaks only if you use the fdt feature). -dl ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [uboot PATCH v2] Add uboot "fdt_high" enviroment variable
On Thu, Jul 14, 2011 at 03:12:25PM -0400, David Long wrote: > On Fri, 2011-07-15 at 03:50 +0900, Grant Likely wrote: > > > > Regardless of this patch, the pandaboard uboot still needs to be > > fixed. Setting an fdt_high variable is useful for debug, but it is not > > a fix. > > > > > Then someone needs to own the issue of stopping the current u-boot > default behavior of relocating the initrd and fdt to the end of RAM when > an fdt is present. This is an issue for any Linux ARM system with more > than 3/4GB of RAM, and probably for other 32-bit architectures. The > logic that causes the problem is in architecture-independent code, and > I'm not sure I'm necessarily the right guy to go rummaging around in > there. There are too many implications for any other currently > supported targets that use u-boot and fdt. You should have everything you need to fix it. If CONFIG_SYS_BOOTMAPSZ is defined, then U-Boot will not use memory larger that that for the dtb or atags. Right now CONFIG_SYS_BOOTMAPSZ is not set by default, but we could default it to a sane value for ARM platforms. A better solution in the long term may be to figure out the actual memory footprint required, and not make things any larger than that, but that requires U-Boot to be given more data about the kernel, or the zImage wrapper to be more intelligent about dtb and initrd ranges when uncompressing g. ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
0xbench clone causing all Android builds to fail
Working on it... ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [U-Boot] [uboot PATCH v2] Add uboot "fdt_high" enviroment variable
On Thu, 2011-07-14 at 15:21 -0500, Scott Wood wrote: > You have memory below where the kernel is loaded? Our boot script loads the kernel 2MB into physical RAM. It loads the initrd and fdt from the same NAND flash file system into RAM below that. When we boot without specifying an FDT, u-boot does not relocate the initrd. When we specify an FDT address in RAM, u-boot relocates both. We do not need that relocation (in this case at least). > > This splits > > memory into three, instead of two regions in the kernel. I don't think > > that split ever goes away. Then there's the additional region we already > > have to create for the Ducati memory. That's at least five memory > > regions total. There are only eight regions currently allowed by > > default. I don't have a feel for the implications of this, but it seems > > unnecessary. > > What do you mean by a "region" here, and why can there only be eight of > them? Functionally identical and contiguous sections of RAM recorded in the Linux global meminfo data structure, and (mostly) operated on in code found in arch/arm/mm/. There's a define that sets the size of this array to 8. Again, I don't know the implications, if any, of having several versus a couple of these banks/regions. It just seems a bad idea to create more holes in the middle of physical RAM unless we really have to. Plus, we have to inform the kernel about them somehow. I don't have a clear idea how we would do that in a clean way. Seems to me it'd be uglier than the fdt_high approach. Maybe I'm missing something though. I'm certainly not a VM expert. > > Again, I don't think the problem is where u-boot relocates this data > > TOO, but the fact that the new default is to relocate it at all. Is > > there a reason for relocating this stuff? The initrd always used to be > > happy left where it was. > > The user specified address might be in flash. But in our case it is not. And we're now being relocated when we did not get relocated prior to FDT functionality. -dl ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [U-Boot] [uboot PATCH v2] Add uboot "fdt_high" enviroment variable
On Thu, 2011-07-14 at 14:43 -0500, Scott Wood wrote: > You need to use lmb_reserve() to exclude any memory regions that are not > suitable for boot images -- see powerpc's arch_lmb_reserve() and > get_effective_memsize()/CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE. If one excludes HIGHMEM from the area u-boot is allowed to relocate the fdt/initrd to, then it will put it at the end of the 3/4GB boundary (can one exclude all memory above the kernel start address?). This splits memory into three, instead of two regions in the kernel. I don't think that split ever goes away. Then there's the additional region we already have to create for the Ducati memory. That's at least five memory regions total. There are only eight regions currently allowed by default. I don't have a feel for the implications of this, but it seems unnecessary. Again, I don't think the problem is where u-boot relocates this data TOO, but the fact that the new default is to relocate it at all. Is there a reason for relocating this stuff? The initrd always used to be happy left where it was. -dl ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATCH 07/11] Watchdog: DA9052 watchdog support v1
Hi Ashish, Dajun, > > This driver adds support for the watchdog functionality provided by the > > Dialog > > Semiconductor DA9052 PMIC chip. > > > > Signed-off-by: David Dajun Chen > > Signed-off-by: Ashish Jangam > > --- > If there are no comments then can you ACK this patch? I remain with my comment of Wed 26 Jan 2011: > The ioctl WDIOC_SETOPTIONS call is not in line with the watchdog API. > the supported options are: > #define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */ > #define WDIOS_ENABLECARD0x0002 /* Turn on the watchdog timer */ > #define WDIOS_TEMPPANIC 0x0004 /* Kernel panic on temperature trip */ > Your options are: > #define DA9052_STROBING_FILTER_ENABLE 0x0001 > #define DA9052_STROBING_FILTER_DISABLE 0x0002 > #define DA9052_SET_STROBING_MODE_MANUAL 0x0004 > #define DA9052_SET_STROBING_MODE_AUTO 0x0008 > > Please explain what you want to do. FYI: this is how the code looks now: + case WDIOC_SETOPTIONS: + if (get_user(new_value, p)) + return -EFAULT; + if (new_value == DA9052_ENABLE || new_value == DA9052_DISABLE) + da9052_sm_set_strobing_filter(wdt, new_value); + else + wdt->pwdt->sm_strobe_mode_flag = new_value; + return 0; Since the code is still not in line with the watchdog API and since I did not get an answer yet on what you (or Dajun) want to do, there is definitely NO ACK yet. If there is a good reasoning behind your needs, we might conclude that this is indeed worthwhile and extend the API in a proper way. But as it is now, it's not correct. Kind regards, Wim. ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [U-Boot] [uboot PATCH v2] Add uboot "fdt_high" enviroment variable
Hi Dave, This looks reasonable, with one minor nit... On 07/09/2011 04:40 PM, David A. Long wrote: From: David A. Long Add a new "fdt_high" enviroment variable. This can be used to control (or prevent) the relocation of the flattened device tree on boot. It can be used to prevent relocation of the fdt into highmem. The variable behaves similarly to the existing "initrd_high" variable. Signed-off-by: David A. Long --- README |9 common/image.c | 60 ++-- 2 files changed, 58 insertions(+), 11 deletions(-) diff --git a/README b/README index 8bb9c8d..5b95246 100644 --- a/README +++ b/README @@ -3281,6 +3281,15 @@ List of environment variables (most likely not complete): [snip] diff --git a/common/image.c b/common/image.c index e542a57..7853de0 100644 --- a/common/image.c +++ b/common/image.c @@ -1234,8 +1234,10 @@ int boot_relocate_fdt (struct lmb *lmb, char **of_flat_tree, ulong *of_size) { void*fdt_blob = *of_flat_tree; void*of_start = 0; + char*fdt_high; ulong of_len = 0; int err; + int disable_relocation=0; Need spaces around the "=" I will add the spaces before applying the patch unless you send an updated patch. Thanks, gvb ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [U-Boot] [uboot PATCH v2] Add uboot "fdt_high" enviroment variable
On Thu, 14 Jul 2011 15:12:25 -0400 David Long wrote: > On Fri, 2011-07-15 at 03:50 +0900, Grant Likely wrote: > > > > Regardless of this patch, the pandaboard uboot still needs to be > > fixed. Setting an fdt_high variable is useful for debug, but it is not > > a fix. > > > > > Then someone needs to own the issue of stopping the current u-boot > default behavior of relocating the initrd and fdt to the end of RAM when > an fdt is present. This is an issue for any Linux ARM system with more > than 3/4GB of RAM, and probably for other 32-bit architectures. The > logic that causes the problem is in architecture-independent code, and > I'm not sure I'm necessarily the right guy to go rummaging around in > there. There are too many implications for any other currently > supported targets that use u-boot and fdt. You need to use lmb_reserve() to exclude any memory regions that are not suitable for boot images -- see powerpc's arch_lmb_reserve() and get_effective_memsize()/CONFIG_SYS_LINUX_LOWMEM_MAX_SIZE. -scott ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [beagleboard] [ANNOUNCE] First Linaro 11.07 Build Released
On Sun, Jul 10, 2011 at 2:07 PM, Zach Pfeffer wrote: > All, > > I'm happy to announce the first 11.07 build for generic Panda and > Beagle C4. Unfortunately Beagle xM doesn't boot, but Panda and Beagle > C4 look great! > > https://android-build.linaro.org/builds/~linaro-android/beagle-11.07-release/ Hi Zach, Nice work. Is there somewhere where the method to write the Linaro tar files to NAND on Beagle is documented? SD corrupts often on reboot. https://wiki.linaro.org/Platform/Android/ImageInstallation talks about MMC only. -Fred ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [PATCH 1/1] Add ARM cpu topology definition
On Tue, 12 Jul 2011, Amit Kucheria wrote: > From: Vincent Guittot > > (Patch accepted by Russell for 3.1: > http://www.spinics.net/lists/arm-kernel/msg131273.html) That is good enough for me. I merged it in the linaro-2.6.39 tree for now, and I'll pick it up from mainline when linaro-3.0 opens. Nicolas ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [uboot PATCH v2] Add uboot "fdt_high" enviroment variable
On Fri, 2011-07-15 at 03:50 +0900, Grant Likely wrote: > Regardless of this patch, the pandaboard uboot still needs to be > fixed. Setting an fdt_high variable is useful for debug, but it is not > a fix. > Then someone needs to own the issue of stopping the current u-boot default behavior of relocating the initrd and fdt to the end of RAM when an fdt is present. This is an issue for any Linux ARM system with more than 3/4GB of RAM, and probably for other 32-bit architectures. The logic that causes the problem is in architecture-independent code, and I'm not sure I'm necessarily the right guy to go rummaging around in there. There are too many implications for any other currently supported targets that use u-boot and fdt. This new u-boot environment variable stands on it's own as potentially useful, and allows us to avoid the problem (admittedly by specifying environment variable values that really should be the default in this case). -dl ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: [uboot PATCH v2] Add uboot "fdt_high" enviroment variable
On Thursday, July 14, 2011, David Long wrote: > > > > > > > > On Thu, 2011-07-14 at 09:10 -0400, Jerry Van Baren wrote: > > > Hi Dave, > > This looks reasonable, with one minor nit... > > > > > > > Need spaces around the "=" > > I will add the spaces before applying the patch unless you send an > updated patch. > > > > > OK, thanks much. Someone else recently pointed that out to me too. I can > generate another update if you wish, but I'll let you handle that unless you > say otherwise. > > FYI: In case it wasn't clear, this all came about because: 1) the Pandaboard > has 1GB of RAM; 2) the presence of an fdt causes u-boot to relocate the fdt > and ramdisk to the end of ram by default; 3) and the Linux kernel does not > like having to access memory beyond about 3/4G (HIGHMEM) during early boot. > Regardless of this patch, the pandaboard uboot still needs to be fixed. Setting an fdt_high variable is useful for debug, but it is not a fix. g. > -dl > > > > -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: Consistent names for Linaro kernel trees and releases
On 8 July 2011 12:50, john stultz wrote: > On Fri, 2011-07-08 at 12:35 -0700, Deepak Saxena wrote: >> On 1 July 2011 12:14, Deepak Saxena wrote: >> > Each of the trees have various tags and branches based on how each >> > team and developer >> > works and I don't want to ask folks to change what they are doing for >> > their day to work. >> > What I'd like to see is a a separate set of official trees that only >> > get updated with bits that >> > we are ready for non-Linaro developers to use, do not get rebased, and >> > get tagged at the >> > end of each monthly cycle. My proposal: >> > >> > kernel/linux-linaro-$version with tags for each monthly release: >> > v$version-$milestone-$buildcount > > So tag wise, since its a source release, by build count you mean more > like "drop number" or something? Yes, so if we release a tarball and two days later we update it due to a critical bug, we'd increase the buildcount. > So a concrete example would be: > > v2.6.39-11.06.4 > >> > kernel/linux-linaro-android-$version with tags for each monthly >> > release: android-v$version-$milestone-$buildcount > > android-v2.6.39-11.06.4 ? > > The catch here is there may be multiple android drops for one linaro > drop. > > So it would seem: > v2.6.39-11.06.4-android-2 > > Or v$version-$milestone-$buildcount-android-$androidbuildcount Yep, that makes sense. ~Deepak ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: Linaro 11.07 weekly testing 2011-07-14
On 07/14/2011 10:27 AM, Tom Gall wrote: > * Android: > http://snapshots.linaro.org/11.05-daily/linaro-android/leb-panda/20110714/ The latest android build appears to be from last week. Did the build fail for this week? -andy ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Linaro 11.07 weekly testing 2011-07-14
Hi, As Fathi is out on vacation, I thought I'd send out the call for our weekly test activity. Even if you're only about to test one image/hwpack combination, your participation is greatly appreciated and essential. This is a message sent out once per week to call on those in the Linaro community to encourage all Linux/ARM enthusiasts to try out the latest Linaro Evaluation Builds (LEBs) preview images for both Android and Linux. Linaro Evaluation Builds (LEB) These images showcase the current state of development on our LEBs images on their way to the next release: 11.07. * Android: http://snapshots.linaro.org/11.05-daily/linaro-android/leb-panda/20110714/ * Ubuntu: http://snapshots.linaro.org/11.05-daily/linaro-ubuntu-desktop/20110714/0/images/tar/ http://snapshots.linaro.org/11.05-daily/linaro-hwpacks/panda-x11-base/20110714/0/images/hwpack/ Installation Instructions -- Installation Instructions can be found here: https://wiki.linaro.org/Platform/Android/ImageInstallation https://wiki.linaro.org/Platform/DevPlatform/Ubuntu/ImageInstallation Unsupported Images and Board Support Packages -- Besides the official Linaro Evaluation Builds, the Platform Team hosts additional functional images and board support packages. These images and board support packages are not officially supported and are provided on a best-effort basis in the hope that they can be useful for the Linux/ARM enthusiast community. Unsupported Images - * Nano: (Think small) http://snapshots.linaro.org/11.05-daily/linaro-nano/20110714/0/images/tar/ * ALIP: (xfce UI) http://snapshots.linaro.org/11.05-daily/linaro-alip/20110714/0/images/tar/ * Developer: (text UI + developer tools) http://snapshots.linaro.org/11.05-daily/linaro-developer/20110714/0/images/tar/ Unsupported Board Support Packages: -- Board Support Packages come in the form of what is called a hwpack. Hwpacks can be found for efikamx, igep, imx51, lt-mx5, lt-mx53loco, lt-origen, lt-panda-x11-base-natty, lt-panda, lt-s5pv310, lt-snowball, lt-u8500, omap3-x11-base, omap3, overo, panda, s5pv310, and vexpress http://snapshots.linaro.org/11.05-daily/linaro-hwpacks/ Android Developer and Experimental Images -- Developer and Experimental Images based on Android (vanilla AOSP experience using linux-linaro mainline kernel): * Android Mainline for BeagleBoardr-xM: http://snapshots.linaro.org/11.05-daily/linaro-android/beaglexm/20110714/ * Android Mainline for PandaBoard: http://snapshots.linaro.org/11.05-daily/linaro-android/panda/20110714/ Reporting Testing Results -- Report results at: http://qatracker.linaro.org For an explanation of how to use the qatracker please see: https://wiki.linaro.org/QA/QATracker -- Regards, Tom "We want great men who, when fortune frowns will not be discouraged." - Colonel Henry Knox Linaro.org │ Open source software for ARM SoCs 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: [U-Boot] [uboot PATCH v2] Add uboot "fdt_high" enviroment variable
On Thu, 2011-07-14 at 09:10 -0400, Jerry Van Baren wrote: > Hi Dave, > > This looks reasonable, with one minor nit... > > Need spaces around the "=" > > I will add the spaces before applying the patch unless you send an > updated patch. > OK, thanks much. Someone else recently pointed that out to me too. I can generate another update if you wish, but I'll let you handle that unless you say otherwise. FYI: In case it wasn't clear, this all came about because: 1) the Pandaboard has 1GB of RAM; 2) the presence of an fdt causes u-boot to relocate the fdt and ramdisk to the end of ram by default; 3) and the Linux kernel does not like having to access memory beyond about 3/4G (HIGHMEM) during early boot. Thanks again, -dl ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: Please tag commits referred to by pinned and release manifests in Android builds
Hello Nicolas, On Wed, 13 Jul 2011 08:22:08 +0200 "Dechesne, Nicolas" wrote: > On Tue, Jul 12, 2011 at 9:07 AM, Ricardo Salveti > > wrote: > > > Is there other way to fix this at the tool instead of forcing the > > component tree owner to not rebase the tree? > > > > if the problem is that you rely on external maintainers to 1) create > a tag or a ref that reaches the commits you depend on for your > release, or 2) do not rebase so that you don't loose your commit. > it's likely that the only option is to mirror all trees you need so > that you can tag them and have no external dependency. that's one of > the reason why all projects are cloned on git.omapzoom.org, because > we needed to get reproducible trees since OMAP Android releases are > also based on 'static' manifests Well, yes, mirroring everything of course will be the most general solution, but would add burden on our side and complicate getting quick answer to the most basic question "what was changed in Linaro tree comparing to the upstream". So, while we're busy with setting up the rest of Android-related infrastructure, maybe it's worth trying to optimize existing set up even if it's heuristical and depends on some external conditions, maybe it will be quite workable in practice after all. -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
Re: Please tag commits referred to by pinned and release manifests in Android builds
Hello John, On Tue, 12 Jul 2011 02:13:40 -0600 John Rigby wrote: [] > If I read the prior emails correctly then the commit needs to be > reachable by a head but not necessarily "the" head as in master so I > believe that I can still rebase master (or whatever) as long as > released commits are still accessible from some other head. So if > each time a release happens a branch is created as well as a tag then > there is no problem other than the noise of having these extra > branches that only exist for keep tags or commits accessible. Please > someone correct me if I am wrong. Yes, this should be the case, i.e. besides creating a tag, also to create a branch from the same underlying revision. Yes, that will lead to proliferation of branches (just as proliferation of tags is often the problem for may projects), but let's treat that as temporary solution while we settle this issue. We might end up with something else, or make policy to clean up old branches/tags after good timeout. In the meantime, I posted about the problem to repo mailing list (cc: linaro-dev), initial response was positive, so maybe it would be fixed on repo side. > > --john -- Best Regards, Paul Linaro.org | Open source software for ARM SoCs Follow Linaro: http://www.facebook.com/pages/Linaro http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev
[Patch v1 08/11] Touch: DA9052 touchscreen driver
This driver add support for DA9052 4-wire resistive ADC interfaced touchscreen controller. DA9052 is a MFD therefore this driver depends on DA9052 core driver for core functionalities. Signed-off-by: David Dajun Chen Signed-off-by: Ashish Jangam --- drivers/input/touchscreen/Kconfig |7 + drivers/input/touchscreen/Makefile |1 + drivers/input/touchscreen/da9052_tsi.c | 489 3 files changed, 497 insertions(+), 0 deletions(-) create mode 100755 drivers/input/touchscreen/da9052_tsi.c diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index cabd9e5..a5d2e7b 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -144,6 +144,13 @@ config TOUCHSCREEN_DA9034 Say Y here to enable the support for the touchscreen found on Dialog Semiconductor DA9034 PMIC. +config TOUCHSCREEN_DA9052 + tristate "Dialog DA9052 TSI" + depends on PMIC_DA9052 + help + Say y here to support the touchscreen found on + Dialog Semiconductor DA9052 PMIC + config TOUCHSCREEN_DYNAPRO tristate "Dynapro serial touchscreen" select SERIO diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile index 282d6f7..a4aeb25 100644 --- a/drivers/input/touchscreen/Makefile +++ b/drivers/input/touchscreen/Makefile @@ -18,6 +18,7 @@ obj-$(CONFIG_TOUCHSCREEN_BITSY) += h3600_ts_input.o obj-$(CONFIG_TOUCHSCREEN_BU21013) += bu21013_ts.o obj-$(CONFIG_TOUCHSCREEN_CY8CTMG110) += cy8ctmg110_ts.o obj-$(CONFIG_TOUCHSCREEN_DA9034) += da9034-ts.o +obj-$(CONFIG_TOUCHSCREEN_DA9052) += da9052_tsi.o obj-$(CONFIG_TOUCHSCREEN_DYNAPRO) += dynapro.o obj-$(CONFIG_TOUCHSCREEN_HAMPSHIRE)+= hampshire.o obj-$(CONFIG_TOUCHSCREEN_GUNZE)+= gunze.o diff --git a/drivers/input/touchscreen/da9052_tsi.c b/drivers/input/touchscreen/da9052_tsi.c new file mode 100755 index 000..dade0a9 --- /dev/null +++ b/drivers/input/touchscreen/da9052_tsi.c @@ -0,0 +1,489 @@ +/* + * TSI driver for Dialog DA9052 + * + * Copyright(c) 2011 Dialog Semiconductor Ltd. + * + * Author: David Dajun Chen + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define DA9052_ACTIVE 1 +#define DA9052_INACTIVE0 + +#define DA9052_TSI_FIFOSIZE640 + +enum { + DA9052_PEN_IDLE, + DA9052_PEN_DOWN, + DA9052_PEN_UP +}; + +struct da9052_tsi_reg { + u16 x; + u16 y; +}; + +struct tsi_thread_type { + u8 pid; + u8 state; + struct completion notifier; + struct task_struct *thread_task; +}; + +struct da9052_tsi { + struct da9052 *da9052; + struct input_dev *dev; + struct tsi_thread_type tsi_pen_state_thread; + struct tsi_thread_type tsi_filter_thread; + struct kfifo fifo; + struct kfifo fifo_buf; + u8 pen_up_detect_interval; + u32 zero_data_cnt; + u32 valid_penup_count; + u8 pen_state; + int irq_pendwn; + int irq_datardy; +}; + +static inline int da9052_ts_start(struct da9052_tsi *tsi) +{ + return da9052_reg_update(tsi->da9052, DA9052_TSI_CONT_A_REG, +1 << 0, 1 << 0); +} + +static inline int da9052_ts_stop(struct da9052_tsi *tsi) +{ + return da9052_clear_bits(tsi->da9052, DA9052_TSI_CONT_A_REG, 1 << 0); +} + +static irqreturn_t da9052_ts_pendwn_irq(int irq, void *data) +{ + struct da9052_tsi *tsi = (struct da9052_tsi *)data; + struct da9052 *da9052 = tsi->da9052; + int ret; + + da9052->events_mask |= DA9052_E_PEN_DOWN; + da9052->events_mask &= ~DA9052_E_TSI_READY; + + /* Mask PEN_DOWN event and unmask TSI_READY event*/ + ret = da9052_reg_update(da9052, DA9052_IRQ_MASK_B_REG, 0x80, 0x40); + if (ret < 0) + return IRQ_NONE; + + da9052_ts_start(tsi); + tsi->pen_state = DA9052_PEN_DOWN; + + return IRQ_HANDLED; +} + +static int da9052_ts_read(struct da9052_tsi *tsi) +{ + struct da9052_tsi_reg co_ord = {0, 0}; + int ret; + uint8_t _x, _y, _v; + + ret = da9052_reg_read(tsi->da9052, DA9052_TSI_X_MSB_REG); + if (ret < 0) + return ret; + + _x = (uint8_t) ret; + + ret = da9052_reg_read(tsi->da9052, DA9052_TSI_Y_MSB_REG); + if (ret < 0) + return ret; + + _y = (uint8_t) ret; + + ret = da9052_reg_read(tsi->da9052, DA9052_TSI_LSB_REG); + if (ret < 0) + return ret; + + _v = (uint8_t) ret; + +
[Patch v1 04/11]Power: DA9052 battery driver
Driver for DA9052 battery charger. This driver depends on DA9052 MFD core dirver for definitions and methods. Signed-off-by: David Dajun Chen Signed-off-by: Ashish Jangam --- drivers/power/Kconfig |7 + drivers/power/Makefile |1 + drivers/power/da9052-battery.c | 602 3 files changed, 610 insertions(+), 0 deletions(-) create mode 100755 drivers/power/da9052-battery.c diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index cc019c9..0cee85a 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -142,6 +142,13 @@ config BATTERY_DA9030 Say Y here to enable support for batteries charger integrated into DA9030 PMIC. +config BATTERY_DA9052 + tristate "Dialog DA9052 Battery" + depends on PMIC_DA9052 + help + Say Y here to enable support for batteries charger integrated into + DA9052 PMIC. + config BATTERY_MAX17040 tristate "Maxim MAX17040 Fuel Gauge" depends on I2C diff --git a/drivers/power/Makefile b/drivers/power/Makefile index 8fcd93f..933d121 100644 --- a/drivers/power/Makefile +++ b/drivers/power/Makefile @@ -24,6 +24,7 @@ obj-$(CONFIG_BATTERY_WM97XX) += wm97xx_battery.o obj-$(CONFIG_BATTERY_BQ20Z75) += bq20z75.o obj-$(CONFIG_BATTERY_BQ27x00) += bq27x00_battery.o obj-$(CONFIG_BATTERY_DA9030) += da9030_battery.o +obj-$(CONFIG_BATTERY_DA9052) += da9052-battery.o obj-$(CONFIG_BATTERY_MAX17040) += max17040_battery.o obj-$(CONFIG_BATTERY_MAX17042) += max17042_battery.o obj-$(CONFIG_BATTERY_Z2) += z2_battery.o diff --git a/drivers/power/da9052-battery.c b/drivers/power/da9052-battery.c new file mode 100755 index 000..7831cb3 --- /dev/null +++ b/drivers/power/da9052-battery.c @@ -0,0 +1,607 @@ +/* + * Batttery Driver for Dialog DA9052 PMICs + * + * Copyright(c) 2011 Dialog Semiconductor Ltd. + + * Author: Dajun Chen + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* STATIC CONFIGURATION */ +#define DA9052_BAT_CUTOFF_VOLT 2800 +#define DA9052_BAT_THRESHOLD 62 +#define DA9052_BAT_CAPACITY_LIMIT_LOW 4 +#define DA9052_AVERAGE_SIZE4 +#define DA9052_LOOK_UP_TABLE_SIZE 68 +#define DA9052_NO_OF_LOOKUP_TABLE 3 +#define DA9052_IRQ_DCIN0 +#define DA9052_IRQ_VBUS1 +#define DA9052_IRQ_DCINREM 2 +#define DA9052_IRQ_VBUSREM 3 +#define DA9052_IRQ_TBAT12 +#define DA9052_IRQ_CHGEND 11 + +enum charger_type_enum { + DA9052_NOCHARGER = 1, + DA9052_USB_HUB, + DA9052_USB_CHARGER, + DA9052_WALL_CHARGER, +}; + +static const u16 temperature_lookup_ref[3] = {10, 25, 40}; +static u32 const vbat_vs_capacity_look_up[3][68][2] = { + /* For temperature 10 degree celisus*/ + { + {4082, 100}, {4036, 98}, + {4020, 96}, {4008, 95}, + {3997, 93}, {3983, 91}, + {3964, 90}, {3943, 88}, + {3926, 87}, {3912, 85}, + {3900, 84}, {3890, 82}, + {3881, 80}, {3873, 79}, + {3865, 77}, {3857, 76}, + {3848, 74}, {3839, 73}, + {3829, 71}, {3820, 70}, + {3811, 68}, {3802, 67}, + {3794, 65}, {3785, 64}, + {3778, 62}, {3770, 61}, + {3763, 59}, {3756, 58}, + {3750, 56}, {3744, 55}, + {3738, 53}, {3732, 52}, + {3727, 50}, {3722, 49}, + {3717, 47}, {3712, 46}, + {3708, 44}, {3703, 43}, + {3700, 41}, {3696, 40}, + {3693, 38}, {3691, 37}, + {3688, 35}, {3686, 34}, + {3683, 32}, {3681, 31}, + {3678, 29}, {3675, 28}, + {3672, 26}, {3669, 25}, + {3665, 23}, {3661, 22}, + {3656, 21}, {3651, 19}, + {3645, 18}, {3639, 16}, + {3631, 15}, {3622, 13}, + {3611, 12}, {3600, 10}, + {3587, 9}, {3572, 7}, + {3548, 6}, {3503, 5}, + {3420, 3}, {3268, 2}, + {2992, 1}, {2746, 0} + }, + /* For temperature 25 degree celisus */ + { + {4102, 100}, {4065, 98}, + {4048, 96}, {4034, 95}, + {4021, 93}, {4011, 92}, + {4001, 90}, {3986, 88}, + {3968, 87}, {3952, 85}, + {3938, 84}, {3926, 82}, + {3916, 81}, {3908, 79}, + {3900, 77}, {3892, 76}, + {3883, 74}, {3874, 73}, + {3864, 71}, {3855, 70}, + {3846, 68}, {3836, 67}, + {3827, 65}, {3819, 64}, + {3810, 62}, {3801, 61}, + {3793, 59}, {3786, 58}, + {3778, 56}, {3772, 55}, + {3765, 53}, {3759, 52}, + {3754, 50}, {3748, 49}, + {3743, 47}, {3738, 46}, + {3733, 44}, {3728, 43}, + {3724, 41}, {3720, 40}, + {3716, 38}
Re: [PATCH 07/11] Watchdog: DA9052 watchdog support v1
On Tue, 2011-07-05 at 18:51 +0530, ashishj3 wrote: > This driver adds support for the watchdog functionality provided by the Dialog > Semiconductor DA9052 PMIC chip. > > Signed-off-by: David Dajun Chen > Signed-off-by: Ashish Jangam > --- If there are no comments then can you ACK this patch? ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev