[Android: build.git] Create uInitrd instead of ramdisk.img

2011-04-19 Thread Patrik Ryd
In the Linaro set up u-boot will look for uImage and uInitrd.
This patch is Linaro specific and should not be contibuted to AOSP.
---
 core/Makefile |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/Makefile b/core/Makefile
index 857dd20..f75832a 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -309,13 +309,14 @@ INTERNAL_RAMDISK_FILES := $(filter $(TARGET_ROOT_OUT)/%, \
$(ALL_GENERATED_SOURCES) \
$(ALL_DEFAULT_INSTALLED_MODULES))
 
-BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
+BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/uInitrd
 
 # We just build this directly to the install location.
 INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET)
 $(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) | 
$(MINIGZIP)
$(call pretty,"Target ram disk: $@")
-   $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
+   $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > 
$(PRODUCT_OUT)/obj/temp_ramdisk.img
+   mkimage -A arm -O linux -T ramdisk -n "Android Ramdisk Image" -d 
$(PRODUCT_OUT)/obj/temp_ramdisk.img $@
 
 
 ifneq ($(strip $(TARGET_NO_KERNEL)),true)
-- 
1.7.1


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


Re: [Android: build.git] Create uInitrd instead of ramdisk.img

2011-04-19 Thread Alexander Sack
On Tue, Apr 19, 2011 at 10:35 AM, Patrik Ryd  wrote:
> -       $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
> +       $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > 
> $(PRODUCT_OUT)/obj/temp_ramdisk.img
> +       mkimage -A arm -O linux -T ramdisk -n "Android Ramdisk Image" -d 
> $(PRODUCT_OUT)/obj/temp_ramdisk.img $@

any reason why we use temp_ramdisk.img vs. keeping the original
ramdisk.img name?

-- 

 - Alexander

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


Re: [Android: build.git] Create uInitrd instead of ramdisk.img

2011-04-19 Thread Patrik Ryd
On 19 April 2011 10:39, Alexander Sack  wrote:
> On Tue, Apr 19, 2011 at 10:35 AM, Patrik Ryd  wrote:
>> -       $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
>> +       $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > 
>> $(PRODUCT_OUT)/obj/temp_ramdisk.img
>> +       mkimage -A arm -O linux -T ramdisk -n "Android Ramdisk Image" -d 
>> $(PRODUCT_OUT)/obj/temp_ramdisk.img $@
>
> any reason why we use temp_ramdisk.img vs. keeping the original
> ramdisk.img name?
>
Not really.

 /Patrik
> --
>
>  - Alexander
>

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


[PATCH v2 Android: build.git 1/2] Rename the kernel to uImage for Linaro Android build

2011-04-19 Thread Patrik Ryd
In the Linaro set up u-boot will look for uImage (and not for kernel).
This patch is Linaro specific and should not be contibuted to AOSP.
---
 target/board/Android.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target/board/Android.mk b/target/board/Android.mk
index 82dee3c..f3e4729 100644
--- a/target/board/Android.mk
+++ b/target/board/Android.mk
@@ -15,7 +15,7 @@ else
 endif  # TARGET_NO_BOOTLOADER
 
 ifneq ($(strip $(TARGET_NO_KERNEL)),true)
-  INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/kernel
+  INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/uImage
 else
   INSTALLED_KERNEL_TARGET :=
 endif
-- 
1.7.1


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


[PATCH v2 Android: build.git 2/2] Create uInitrd instead of ramdisk.img

2011-04-19 Thread Patrik Ryd
In the Linaro set up u-boot will look for uImage and uInitrd.
This patch is Linaro specific and should not be contibuted to AOSP.
---
 core/Makefile |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/Makefile b/core/Makefile
index 857dd20..79d59a5 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -309,13 +309,14 @@ INTERNAL_RAMDISK_FILES := $(filter $(TARGET_ROOT_OUT)/%, \
$(ALL_GENERATED_SOURCES) \
$(ALL_DEFAULT_INSTALLED_MODULES))
 
-BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
+BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/uInitrd
 
 # We just build this directly to the install location.
 INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET)
 $(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) | 
$(MINIGZIP)
$(call pretty,"Target ram disk: $@")
-   $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
+   $(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > 
$(PRODUCT_OUT)/obj/ramdisk.img
+   mkimage -A arm -O linux -T ramdisk -n "Android Ramdisk Image" -d 
$(PRODUCT_OUT)/obj/ramdisk.img $@
 
 
 ifneq ($(strip $(TARGET_NO_KERNEL)),true)
-- 
1.7.1


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


Re: [U-Boot] [PATCH v2] S5P: GPIO Macro Values Corrected.

2011-04-19 Thread Minkyu Kang
Dear Chander Kashyap,

On 18 April 2011 19:08, Chander Kashyap  wrote:
> S5PC2XX: Macro values for Pull Up and Driver Strength were wrong.
> S5PC1XX: Macro values for Driver Strength were wrong.
>
> Signed-off-by: Chander Kashyap 
> ---
>
> Changes for V2:
>        - Macro value order fixed.
>        - Added Changes for S5PC1XX.
>
>  arch/arm/include/asm/arch-s5pc1xx/gpio.h |    4 ++--
>  arch/arm/include/asm/arch-s5pc2xx/gpio.h |    7 +++
>  2 files changed, 5 insertions(+), 6 deletions(-)
>

applied to u-boot-samsung

Thanks
Minkyu Kang.
-- 
from. prom.
www.promsoft.net

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


Re: [U-Boot] [PATCH] S5P:SROM config code moved to s5p-common directory

2011-04-19 Thread Minkyu Kang
Dear Chander Kashyap

On 15 April 2011 14:05, Chander Kashyap  wrote:
> SROM config code is made common for S5P series of boards.
> smdkc100.c now refers to s5p-common/sromc.c for SROM related
> subroutines.
>
> Signed-off-by: Chander Kashyap 
> ---
>  arch/arm/cpu/armv7/s5p-common/Makefile    |    3 +-
>  arch/arm/cpu/armv7/s5p-common/sromc.c     |   49 ++
>  arch/arm/cpu/armv7/s5pc1xx/Makefile       |    1 -
>  arch/arm/cpu/armv7/s5pc1xx/sromc.c        |   49 --
>  arch/arm/include/asm/arch-s5pc1xx/smc.h   |   53 
> -
>  arch/arm/include/asm/arch-s5pc1xx/sromc.h |   53 
> +
>  board/samsung/smdkc100/smdkc100.c         |    4 +-
>  7 files changed, 106 insertions(+), 106 deletions(-)
>  create mode 100644 arch/arm/cpu/armv7/s5p-common/sromc.c
>  delete mode 100644 arch/arm/cpu/armv7/s5pc1xx/sromc.c
>  delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/smc.h
>  create mode 100644 arch/arm/include/asm/arch-s5pc1xx/sromc.h
>

applied to u-boot-samsung

Thanks
Minkyu Kang.
-- 
from. prom.
www.promsoft.net

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


Re: [Android: device/linaro/common] Rename the kernel to uImage for Linaro Android build

2011-04-19 Thread Patrik Ryd
On 18 April 2011 08:46, Jim Huang  wrote:
> On 18 April 2011 14:40,   wrote:
>> From: Patrik Ryd 
>>
>> In the Linaro set up u-boot will look for uImage (and not for kernel).
>> ---
>>  tasks/kernel.mk |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> hi Patrik,
>
> Does this imply that we requires u-boot as necessary support for common LEB?

We do at the moment.

This patch together with the two others I just sent for review
(build.git, use uImage for kernel and uInitrd instead of ramdisk.img)
are there to make u-boot happy.

And we have included u-boot in the boottarball. (See
https://blueprints.launchpad.net/linaro-android/+spec/linaro-android-platform-kernel-boottarball
for details)

 /Patrik
>
> I am not sure if we should introduce an abstract provider for kernel
> image, but I prefer to specify in board configurations since we might
> migrate to other 'fastboot' compatible boot loader implementations
> such as lk (little kernel) used in Qualcomm patform.
>
> Thanks,
> -jserv
>
>> diff --git a/tasks/kernel.mk b/tasks/kernel.mk
>> index a016d6e..f0ebb93 100644
>> --- a/tasks/kernel.mk
>> +++ b/tasks/kernel.mk
>> @@ -3,5 +3,5 @@ android_kernel:
>>        make ARCH=arm CROSS_COMPILE=../$(TARGET_TOOLS_PREFIX) defconfig 
>> $(KERNEL_CONFIG) &&\
>>        make ARCH=arm CROSS_COMPILE=../$(TARGET_TOOLS_PREFIX) uImage
>>
>> -$(PRODUCT_OUT)/kernel: android_kernel
>> -       ln -sf ../../../../kernel/arch/arm/boot/uImage $(PRODUCT_OUT)/kernel
>> \ No newline at end of file
>> +$(PRODUCT_OUT)/uImage: android_kernel
>> +       ln -sf ../../../../kernel/arch/arm/boot/uImage $(PRODUCT_OUT)/uImage
>> \ No newline at end of file
>> --
>> 1.7.1
>

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


Re: [PATCH 2/5] mmc: sdhci: eliminate sdhci_of_host and sdhci_of_data

2011-04-19 Thread Wolfram Sang
On Fri, Mar 25, 2011 at 04:48:48PM +0800, Shawn Guo wrote:
> The patch is to migrate the use of sdhci_of_host and sdhci_of_data
> to sdhci_pltfm_host and sdhci_pltfm_data, so that the former pair can
> be eliminated.
> 
> Signed-off-by: Shawn Guo 
> ---

[...]

> diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h
> index a3e4be0..12afe86 100644
> --- a/drivers/mmc/host/sdhci-pltfm.h
> +++ b/drivers/mmc/host/sdhci-pltfm.h
> @@ -19,6 +19,10 @@
>  struct sdhci_pltfm_host {
>   struct clk *clk;
>   u32 scratchpad; /* to handle quirks across io-accessor calls */
> +
> + /* migrate from sdhci_of_host */
> + unsigned int clock;
> + u16 xfer_mode_shadow;

xfer_mode_shadow can be merged into scratchpad. They both fix the same
issue.

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 1/5] mmc: sdhci: make sdhci-pltfm device drivers self registered

2011-04-19 Thread Wolfram Sang

On Fri, Mar 25, 2011 at 04:48:47PM +0800, Shawn Guo wrote:
> The patch turns the common stuff in sdhci-pltfm.c into functions, and
> add device drivers their own .probe and .remove which in turn call
> into the common functions, so that those sdhci-pltfm device drivers
> register itself and keep all device specific things away from common
> sdhci-pltfm file.
> 
> Signed-off-by: Shawn Guo 
> ---

I'll second the comments from Grant (with one slight exception which is
noted below)

> +static int __devexit sdhci_dove_remove(struct platform_device *pdev)
> +{
> + struct sdhci_host *host = platform_get_drvdata(pdev);
> + int dead = 0;
> + u32 scratch;
> +
> + scratch = readl(host->ioaddr + SDHCI_INT_STATUS);
> + if (scratch == (u32)-1)
> + dead = 1;

I'd prefer

dead = (readl() == 0x);

(or (u32)-1 if you prefer). But keeping a variable 'dead' is more
descriptive than keeping 'scratch'.

> +MODULE_LICENSE("GPL v2");

Just to be sure: Did you double-check if the original licenses were v2
or v2+?

> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c

[...]

> -err_add_host:
> - if (pdata && pdata->exit)
> - pdata->exit(host);
> -err_plat_init:
> - iounmap(host->ioaddr);
>  err_remap:
>   release_mem_region(iomem->start, resource_size(iomem));
>  err_request:
>   sdhci_free_host(host);
>  err:
> - printk(KERN_ERR"Probing of sdhci-pltfm failed: %d\n", ret);
> - return ret;
> + pr_err("%s failed %d\n", __func__, ret);

dev_err?

> + return NULL;
>  }
>  

I didn't pay much attention to the OF version of the tegra driver, since
it still is not upstream yet, right?

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 0/5] consolidate sdhci pltfm & OF drivers and get them self registered

2011-04-19 Thread Wolfram Sang
Hi Shawn,

On Fri, Mar 25, 2011 at 04:48:46PM +0800, Shawn Guo wrote:
> Here are what the patch set does.
> 
> * Remove .probe and .remove hooks from sdhci-pltfm.c and make it be
>   a pure common helper function providers.
> * Add .probe and .remove hooks for sdhci pltfm drivers sdhci-cns3xxx,
>   sdhci-dove, sdhci-tegra, and sdhci-esdhc-imx to make them self
>   registered with calling helper functions created above.
> * Migrate the use of sdhci_of_host and sdhci_of_data to
>   sdhci_pltfm_host and sdhci_pltfm_data, so that OF version host and
>   data structure works can be saved, and pltfm version works for both
>   cases.
> * Add OF common helper stuff into sdhci-pltfm.c, and make OF version
>   sdhci drivers sdhci-of-esdhc and sdhci-of-hlwd become self
>   registered as well, so that sdhci-of-core.c and sdhci-of.h can be
>   removed.
> * Consolidate the OF and pltfm esdhc drivers into one with sharing
>   the same pair of .probe and .remove hooks.  As a result,
>   sdhci-esdhc-imx.c and sdhci-of-esdhc.c go away, while
>   sdhci-esdhc.c comes in and works for both MPCxxx and i.MX.
> * Eliminate include/linux/mmc/sdhci-pltfm.h with moving stuff into
>   drivers/mmc/host/sdhci-pltfm.h.
> 
> And the benefits we gain from the changes are:
> 
> * Get the sdhci device driver follow the Linux trend that driver
>   makes the registration by its own.
> * sdhci-pltfm.c becomes simple and clean as it only has common helper
>   stuff there now.
> * All sdhci device specific things are going back its own driver.
> * The dt and non-dt drivers are consolidated to use the same pair of
>   .probe and .remove hooks.
> * SDHCI driver for Freescale eSDHC controller found on both MPCxxx
>   and i.MX platforms is consolidated to use the same one .probe
>   function.
> 
> The patch set works against the tree below, and was only tested on
> i.mx51 babbage board, all other targets were build tested.
> 
>   git://git.secretlab.ca/git/linux-2.6.git devicetree/test
> 
> Comments are welcomed and appreciated.

First of all, thanks _a lot_ for doing this! Many people have promised
to do such an approach, but you finally made it!

Sorry for the long delay in reviewing it, I didn't want to rush a review
so I needed some time for it which I didn't have much in the last weeks.
Let's hope my battery will have enough power on my flight back to
Germany ;) So, this is for now a purely "visual" review. I hope I can
check V2 on real hardware then.

The approach seems sensible, so have a look at my (mostly minor)
comments inside the patches. However, there is one bigger piece missing.
You converted all the drivers which had a seperate source-file and
hooked into sdhci-pltfm.c. However, those are only those users which
need additional code to work around the quirks. There are also users
which can take the plain pltfm-driver with a properly set
platform_data (check the thread "[PATCH] mmc: add SDHCI driver for STM
platforms (V2)" for an example). Those have to be converted, too.
Now the discussion could be if every of those users gets its own
pltfm-.c or if we create something similat to
sdhci-pltfm-generic, which can also be setup with platform_data like the
old driver (/me likes the latter a bit more. If we don't change the name
of the driver (not talking about the sourcefile) and keep it
"sdhci-pltfm", then you wouldn't need to change all those users if you
ensured it behaves the same.

Also, I think the next version of this series should have all makers of
a sdhci-pltfm user CCed so we give them a chance to report breakage. Or
donate acks or tested-by.

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 3/5] mmc: sdhci: make sdhci-of device drivers self registered

2011-04-19 Thread Wolfram Sang

> +static int __devinit sdhci_esdhc_probe(struct platform_device *pdev)
> +{
> + struct sdhci_host *host;
> + int ret;
> +
> + host = sdhci_pltfm_init(pdev, &sdhci_esdhc_pdata);
> + if (!host)
> + return -ENOMEM;

Just noticed: Since pltfm_init may fail due to various reasons, maybe
ERRPTR might be a good idea?

[...]

> +static int __init sdhci_hlwd_init(void)
> +{
> + return platform_driver_register(&sdhci_hlwd_driver);
> +}
> +module_init(sdhci_hlwd_init);
> +
> +static void __exit sdhci_hlwd_exit(void)
> +{
> + platform_driver_unregister(&sdhci_hlwd_driver);
> +}
> +module_exit(sdhci_hlwd_exit);
> +
> +MODULE_DESCRIPTION("Secure Digital Host Controller Interface OF driver");
> +MODULE_AUTHOR("Xiaobo Xie , "
> +   "Anton Vorontsov ");
> +MODULE_LICENSE("GPL v2");

Please double check the authors. It is based on the fsl driver, but the
copyright should go to

 * Copyright (C) 2009 The GameCube Linux Team
 * Copyright (C) 2009 Albert Herranz

I think.

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 4/5] mmc: sdhci: consolidate sdhci-of-esdhc and sdhci-esdhc-imx

2011-04-19 Thread Wolfram Sang
>  config MMC_SDHCI_ESDHC_IMX
> - bool "SDHCI platform support for the Freescale eSDHC i.MX controller"
> + bool "SDHCI support for the Freescale eSDHC i.MX controller"
>   depends on ARCH_MX25 || ARCH_MX35 || ARCH_MX5
>   depends on MMC_SDHCI
> - select MMC_SDHCI_PLTFM
> + select MMC_SDHCI_ESDHC
>   select MMC_SDHCI_IO_ACCESSORS
>   help
> -   This selects the Freescale eSDHC controller support on the platform
> -   bus, found on platforms like mx35/51.
> +   This selects the Freescale eSDHC controller support on platforms
> +   like mx35/51.

While we are at it, mx25 could be added and mx53 (and you know better
what else will be coming ;))

> diff --git a/drivers/mmc/host/sdhci-esdhc.c b/drivers/mmc/host/sdhci-esdhc.c
> new file mode 100644
> index 000..b3d1bc1
> --- /dev/null
> +++ b/drivers/mmc/host/sdhci-esdhc.c
> @@ -0,0 +1,413 @@
> +/*
> + * Freescale eSDHC controller driver for MPCxxx and i.MX.
> + *
> + * Copyright (c) 2007 Freescale Semiconductor, Inc.
> + *   Author: Xiaobo Xie 
> + *
> + * Copyright (c) 2009 MontaVista Software, Inc.
> + *   Author: Anton Vorontsov 
> + *
> + * Copyright (c) 2010 Pengutronix e.K.
> + *   Author: Wolfram Sang 
> + *
> + * 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.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#ifdef CONFIG_MMC_SDHCI_ESDHC_IMX
> +#include 
> +#endif
> +#include "sdhci.h"
> +#include "sdhci-pltfm.h"
> +
> +/*
> + * Ops and quirks for the Freescale eSDHC controller.
> + */
> +
> +#define ESDHC_DEFAULT_QUIRKS (SDHCI_QUIRK_FORCE_BLK_SZ_2048 | \
> + SDHCI_QUIRK_BROKEN_CARD_DETECTION | \
> + SDHCI_QUIRK_NO_BUSY_IRQ | \
> + SDHCI_QUIRK_NONSTANDARD_CLOCK | \
> + SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | \
> + SDHCI_QUIRK_PIO_NEEDS_DELAY | \
> + SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET | \
> + SDHCI_QUIRK_NO_CARD_NO_RESET)

These are not the current quirks. Meanwhile BROKEN_CARD_DETECTION is
gone as well as NO_CARD_NO_RESET (at least for imx). My additions to use
GPIOs for card detect and write protect are also not in this version.

[...]

> +static struct sdhci_pltfm_data sdhci_esdhc_mpc_pdata = {
> + .quirks = ESDHC_DEFAULT_QUIRKS,
> + .ops = &sdhci_esdhc_mpc_ops,
> +};
> +#endif

Please mark the #endif with comments of the expression they are
depending on, e.g.

#endif /* CONFIG_MMC_SDHCI_ESDHC_MPC */

if it is not immediately visible. That helps readability.

[...]

Phew, due to all these hardware bugs, the driver will get messy, even if
we try hard. Any chances that future revisions of the core will be
updated? :)

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 5/5] mmc: sdhci: merge two sdhci-pltfm.h into one

2011-04-19 Thread Wolfram Sang
On Fri, Mar 25, 2011 at 04:48:51PM +0800, Shawn Guo wrote:
> The structure sdhci_pltfm_data is not necessarily to be in a public
> header like include/linux/mmc/sdhci-pltfm.h, so the patch moves it
> into drivers/mmc/host/sdhci-pltfm.h and eliminates the former one.
> 
> Signed-off-by: Shawn Guo 

Reviewed-by: Wolfram Sang 

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: [PATCH 0/5] consolidate sdhci pltfm & OF drivers and get them self registered

2011-04-19 Thread Kyungmin Park
Hi,

BTW, Are there reason to omit the sdhci-s3c.c? Maybe Mr. Jung will handle it.

Thank you,
Kyungmin Park

On Tue, Apr 19, 2011 at 7:20 PM, Wolfram Sang  wrote:
> Hi Shawn,
>
> On Fri, Mar 25, 2011 at 04:48:46PM +0800, Shawn Guo wrote:
>> Here are what the patch set does.
>>
>> * Remove .probe and .remove hooks from sdhci-pltfm.c and make it be
>>   a pure common helper function providers.
>> * Add .probe and .remove hooks for sdhci pltfm drivers sdhci-cns3xxx,
>>   sdhci-dove, sdhci-tegra, and sdhci-esdhc-imx to make them self
>>   registered with calling helper functions created above.
>> * Migrate the use of sdhci_of_host and sdhci_of_data to
>>   sdhci_pltfm_host and sdhci_pltfm_data, so that OF version host and
>>   data structure works can be saved, and pltfm version works for both
>>   cases.
>> * Add OF common helper stuff into sdhci-pltfm.c, and make OF version
>>   sdhci drivers sdhci-of-esdhc and sdhci-of-hlwd become self
>>   registered as well, so that sdhci-of-core.c and sdhci-of.h can be
>>   removed.
>> * Consolidate the OF and pltfm esdhc drivers into one with sharing
>>   the same pair of .probe and .remove hooks.  As a result,
>>   sdhci-esdhc-imx.c and sdhci-of-esdhc.c go away, while
>>   sdhci-esdhc.c comes in and works for both MPCxxx and i.MX.
>> * Eliminate include/linux/mmc/sdhci-pltfm.h with moving stuff into
>>   drivers/mmc/host/sdhci-pltfm.h.
>>
>> And the benefits we gain from the changes are:
>>
>> * Get the sdhci device driver follow the Linux trend that driver
>>   makes the registration by its own.
>> * sdhci-pltfm.c becomes simple and clean as it only has common helper
>>   stuff there now.
>> * All sdhci device specific things are going back its own driver.
>> * The dt and non-dt drivers are consolidated to use the same pair of
>>   .probe and .remove hooks.
>> * SDHCI driver for Freescale eSDHC controller found on both MPCxxx
>>   and i.MX platforms is consolidated to use the same one .probe
>>   function.
>>
>> The patch set works against the tree below, and was only tested on
>> i.mx51 babbage board, all other targets were build tested.
>>
>>   git://git.secretlab.ca/git/linux-2.6.git devicetree/test
>>
>> Comments are welcomed and appreciated.
>
> First of all, thanks _a lot_ for doing this! Many people have promised
> to do such an approach, but you finally made it!
>
> Sorry for the long delay in reviewing it, I didn't want to rush a review
> so I needed some time for it which I didn't have much in the last weeks.
> Let's hope my battery will have enough power on my flight back to
> Germany ;) So, this is for now a purely "visual" review. I hope I can
> check V2 on real hardware then.
>
> The approach seems sensible, so have a look at my (mostly minor)
> comments inside the patches. However, there is one bigger piece missing.
> You converted all the drivers which had a seperate source-file and
> hooked into sdhci-pltfm.c. However, those are only those users which
> need additional code to work around the quirks. There are also users
> which can take the plain pltfm-driver with a properly set
> platform_data (check the thread "[PATCH] mmc: add SDHCI driver for STM
> platforms (V2)" for an example). Those have to be converted, too.
> Now the discussion could be if every of those users gets its own
> pltfm-.c or if we create something similat to
> sdhci-pltfm-generic, which can also be setup with platform_data like the
> old driver (/me likes the latter a bit more. If we don't change the name
> of the driver (not talking about the sourcefile) and keep it
> "sdhci-pltfm", then you wouldn't need to change all those users if you
> ensured it behaves the same.
>
> Also, I think the next version of this series should have all makers of
> a sdhci-pltfm user CCed so we give them a chance to report breakage. Or
> donate acks or tested-by.
>
> Regards,
>
>   Wolfram
>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk2tYe8ACgkQD27XaX1/VRsCRgCgkp+BmJJsLsKllKL0OI/BnO9F
> PRkAn1BpnXBv1exnkJFlqFAPe5O2Yt8w
> =GSqA
> -END PGP SIGNATURE-
>
> ___
> linaro-dev mailing list
> linaro-dev@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-dev
>
>

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


Testing IGEP DT support (was: Device Tree on ARM status report - Mar 20)

2011-04-19 Thread Grant Likely
Hi Mounir,

Took me a while, but here are the instructions for testing DT support on IGEP:

The current nightly u-boot builds should work out-of-the-box with
device tree support.  You can use the prebuilt binaries

>From what I can tell, the kernel build doesn't yet have DT enabled for
any of the platforms.  I need to follow up with John Rigby about this
to make sure I'm looking in the right place.  You'll need to build the
kernel.  Pull the linaro 2.6.38 kernel tree:

git://git.linaro.org/kernel/linux-linaro-2.6.38.git

then:

$ make omap2plus_defconfig
$ vim .config
/* turn on CONFIG_USE_OF and CONFIG_PROC_DEVICETREE */
$ make oldconfig uImage dtbs

Copy the uImage and igep dtb files to the sdcard

Make sure the old boot method still works

Reboot and modify the boot command to load the dtb into ram about 64k
below the initrd image and to use "bootm  
" to boot the kernel.

Make sure stuff shows up in /proc/devicetree/.  Also, send me your boot log.

And that's it!

On Mon, Mar 21, 2011 at 3:25 AM, Grant Likely  wrote:
> I had great hopes of doing these status reports once a week; but it
> turns out to take more effort to get together that I estimated.
> Here's the status of ARM device tree support as of today.  As always,
> let me know if you have any corrections or additional information.
>
> 1 - Latest news
> ---
> - The last vestiges of of_platform_bus_type are gone from Linus' tree
> as of the 2.6.39 merge window.  Everything should be using
> platform_device now.
> - devicetree/arm on git://git.secretlab.ca/git/linux-2.6 has
> everything needed to turn on basic device tree support for any
> platform.
>  - Support has been added for Versatile and Tegra in devicetree/arm
>  - Support for Samsung s5pv310 and Freescale mx5 are in devicetree/test
> - Similarly, u-boot needs to have the CONFIG_OF_LIBFDT and
> CONFIG_SYS_BOOTMAPSZ defined to turn on device tree support.
>  - I've also got patches that eliminate the need for
> CONFIG_SYS_BOOTMAPSZ which I'll post shortly, but they're not quite
> working yet.
>  - I've also got a trivial patch that should enabled CONFIG_OF_LIBFDT
> on a large set of boards, but it has had pretty much zero testing.
> :-)
> - Jason Hui has been making awesome progress on mx5, and some of their
> patches are in devicetree/test.  Hopefully to move over to
> devicetree/arm soon.
> - Shawn Guo has also been making good progress on adding the clock
> bindings to the mx5 support.  There are still questions up in the air
> about the best way to handle clocks though.  While all the clocks
> /can/ be converted to device tree data, there is also value in sharing
> clock initialization data between DT and non-DT board support.  The
> of_platform_device_prepare() work mentioned below will help with that.
>  It will also be easier to work on the clock support when the common
> struct clk patch series from Jeremy gets merged.  Until then there
> ends up being a lot of duplication of code.
> - Lennert has a series of virq patches for ARM patches completed.  He
> is currently working on cleaning them up to get them posted.
> - Patches posted for of_platform_prepare() which makes it easier for
> static platform_device registrations to co-exist with device tree
> data.  Patches are currently in devicetree/test, and will move to
> devicetree/arm shortly.
> - Basic DT support has been merged into Nicolas' Linaro kernel tree.
> - DT is also working on Versatile Express, OMAP, and the new Xilinx
> platform, but I don't have patches for either of those platforms in my
> tree.
> - Rob Herring's work on the early dtb mmu maping is mainlined and
> makes it much nicer to work with dtbs.
>
> Next steps:
> --
> At this point I'm putting on my Linaro hat.  Feel free to tune out
> past this point if you're not interested how DT support will
> materialize in the next release.
>
> There are a number of very specific tasks that need to be completed
> for the 11.05 release.  The goal is to have basic device tree support
> turned on and working on all of the platforms supported in the
> release.  There isn't a lot of time to get this pulled together, but
> all the infrastructure is in places, so most of the work is turning on
> the configuration options and testing the platforms.
>
> For each board, I need an engineer to do the following:
>
> 1) Enable CONFIG_OF_LIBFDT and CONFIG_SYS_BOOTMAPSZ against the Linaro
> u-boot tree.
> 2) Enable CONFIG_OF and CONFIG_PROC_DEVICETREE in the kernel
> 3) Add something like the following to the *existing* machine
> definition.  For initial basic support, you don't need to create a
> separate -dt.c board support file yet.
>
> +static const char *omap4_panda_dt_match[] __initdata = {
> +       "ti,omap4-panda",
> +       NULL
> +};
> +
>  MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
> [...]
> +       .dt_compat      = omap4_panda_dt_match,
>  MACHINE_END
>
>    The string in the match table should be in the form ","
>
> 4) Add a template .dts file 

Re: [PATCH v2 00/12] mmc: use nonblock mmc requests to minimize latency

2011-04-19 Thread Jae hoon Chung
Hi Per..

2011/4/11 Per Forlin :
> On 9 April 2011 13:55, Jae hoon Chung  wrote:
>> Hi Per..
>>
>> I'm applied your patch..and sent the patch about dw_mmc.c.
>> I think good this approach..
>>
> Do you have any test results from the mmc_tests I added?
> I am interested in the results.

I didn't test with mmc_tests..but i tested with IOzone..
I'll test with mmc_test..then i'll share the results..

Regards,
Jaehoon Chung

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


Re: [PATCH 0/5] consolidate sdhci pltfm & OF drivers and get them self registered

2011-04-19 Thread Wolfram Sang

> BTW, Are there reason to omit the sdhci-s3c.c? Maybe Mr. Jung will handle it.

The difference is that sdhci-s3c.c was more like a fork of sdhci-pltfm while
the others were users of it. With the new interface, s3c can be converted using
pltfm more easily. If somebody is willing to do that, this is very much
welcome. I'd suggest waiting for Shawn's interface to stabilize, though.

Regards,

   Wolfram

-- 
Pengutronix e.K.   | Wolfram Sang|
Industrial Linux Solutions | http://www.pengutronix.de/  |


signature.asc
Description: Digital signature
___
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev


Re: u-boot + Android 'fastboot' protocol/commands support (was: [Android: device/linaro/common] Rename the kernel to uImage for Linaro Android build)

2011-04-19 Thread Wolfgang Denk
Dear Jim Huang,

In message  you wrote:
>
> My idea is that we require abstract 'bootloader' component in Android
> device/linaro/common, and (patched) 'u-boot' would be the provider of
> 'bootloader' component in
> device/linaro/Linaro-Evaluation-Build-Hardware.  Also, supporting

If you are discussing requirements for U-Boot, and plan to get these
merged in to mainlineU-Boot one day, it would probably be a good idea
to discuss these plans on the U-Boot mailing list as well - ideally
before any design is cast in iron.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The management question ... is not _whether_ to build a pilot  system
and  throw  it away. You _will_ do that. The only question is whether
to plan in advance to build a throwaway, or to promise to deliver the
throwaway to customers.   - Fred Brooks, "The Mythical Man Month"

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


[PATCH android/frameworks/base] libagl: Enable CLZ instruction generation for TextureObjectManager

2011-04-19 Thread Jim Huang
Change-Id: I54cb4755b64076007a5f631f1faa7eab2272f6e6

Code Review:
https://review.source.android.com/#change,22409
From 89d418d731fa061508e514824751220a0e10de0d Mon Sep 17 00:00:00 2001
From: Jim Huang 
Date: Wed, 20 Apr 2011 02:39:28 +0800
Subject: [PATCH] libagl: Enable CLZ instruction generation for TextureObjectManager

Change-Id: I54cb4755b64076007a5f631f1faa7eab2272f6e6
---
 opengl/libagl/Android.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk
index b5c018f..fda53b2 100644
--- a/opengl/libagl/Android.mk
+++ b/opengl/libagl/Android.mk
@@ -12,7 +12,7 @@ LOCAL_SRC_FILES:= \
 	texture.cpp		\
 Tokenizer.cpp   \
 TokenManager.cpp\
-TextureObjectManager.cpp\
+TextureObjectManager.cpp.arm\
 BufferObjectManager.cpp \
 	array.cpp.arm		\
 	fp.cpp.arm		\
-- 
1.7.4.1

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


[PATCH android/bionic 0/3] Reduce code size of libc and libm by GCC visibility

2011-04-19 Thread Jim Huang
The following set of Android bionic patches use GCC visibility pragma
to hide the private symbols in bionic. It also lets the optimizer
produce better and smaller machine code.

[PATCH android/bionic 1/3] Hide private symbols using GCC visibility pragma
[PATCH android/bionic 2/3] Hide internal symbol __bionic_brk used by
brk() and sbrk()
[PATCH android/bionic 3/3] Hide libm private symbols using GCC visibility pragma

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


[PATCH android/bionic 1/3] Hide private symbols using GCC visibility pragma

2011-04-19 Thread Jim Huang
libc.so should not export all private symbols to reflect Android NDK.
This patch attempts to use GCC visibility pragma to hide the private
symbols in bionic. It also lets the optimizer produce better and
smaller code.

Reference code size measurements for HTC Passion:
$ arm-eabi-size out/target/product/passion/system/lib/libc.so

[before]
   textdata bss dec hex filename
 26   10004   45944  315948   4d22c
out/target/product/passion/system/lib/libc.so

[after]
   textdata bss dec hex filename
 2486559940   45944  304539   4a59b
out/target/product/passion/system/lib/libc.so

Code Review:
https://review.source.android.com/#change,17361
From 74015f0fe72daf8e007298975d6415e0e9ee5e47 Mon Sep 17 00:00:00 2001
From: Jim Huang 
Date: Wed, 20 Apr 2011 04:28:44 +0800
Subject: [PATCH] Hide private symbols using GCC visibility pragma

libc.so should not export all private symbols to reflect Android NDK.
This patch attempts to use GCC visibility pragma to hide the private
symbols in bionic. It also lets the optimizer produce better and
smaller code.

Reference code size measurements for HTC Passion:
$ arm-eabi-size out/target/product/passion/system/lib/libc.so

[before]
   text	   data	bss	dec	hex	filename
 26	  10004	  45944	 315948	  4d22c	out/target/product/passion/system/lib/libc.so

[after]
   text	   data	bss	dec	hex	filename
 248655	   9940	  45944	 304539	  4a59b	out/target/product/passion/system/lib/libc.so

Change-Id: Id6e845e1cdba19f578a435d796267a8d07c291c3
---
 libc/include/sys/cdefs_hidden_pop.h  |   41 ++
 libc/include/sys/cdefs_hidden_push.h |   41 ++
 libc/netbsd/isc/eventlib_p.h |3 ++
 libc/netbsd/resolv/res_private.h |4 +++
 libc/private/arpa_nameser.h  |4 +++
 libc/private/bionic_tls.h|4 +++
 libc/private/ctype_private.h |3 ++
 libc/private/isc/eventlib.h  |4 +++
 libc/private/logd.h  |4 +++
 libc/private/nsswitch.h  |4 +++
 libc/private/rand48.h|5 
 libc/private/resolv_cache.h  |4 +++
 libc/private/resolv_private.h|4 +++
 libc/private/resolv_static.h |4 +++
 libc/private/thread_private.h|4 +++
 libc/stdio/local.h   |4 +++
 16 files changed, 137 insertions(+), 0 deletions(-)
 create mode 100644 libc/include/sys/cdefs_hidden_pop.h
 create mode 100644 libc/include/sys/cdefs_hidden_push.h

diff --git a/libc/include/sys/cdefs_hidden_pop.h b/libc/include/sys/cdefs_hidden_pop.h
new file mode 100644
index 000..741fede
--- /dev/null
+++ b/libc/include/sys/cdefs_hidden_pop.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ *  * Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in
+ *the documentation and/or other materials provided with the
+ *distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* Ignore GCC visibility if debug build */
+#if !defined(DEBUG) || defined(NDEBUG)
+
+#if !defined(__LIBC_HIDDEN_PUSH_DEFINED)
+#error "Unbalanced pair of GCC visibility push/pop"
+#endif
+
+#define __LIBC_HIDDEN_POP_DEFINED
+#undef __LIBC_HIDDEN_PUSH_DEFINED
+
+#pragma GCC visibility pop
+
+#endif
diff --git a/libc/include/sys/cdefs_hidden_push.h b/libc/include/sys/cdefs_hidden_push.h
new file mode 100644
index 000..3b12cbd
--- /dev/null
+++ b/libc/include/sys/cdefs_hidden_push.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *  * Redistributions of source code must retai

[PATCH android/bionic 2/3] Hide internal symbol __bionic_brk used by brk() and sbrk()

2011-04-19 Thread Jim Huang
__bionic_brk was shared by brk() and sbrk(), which should be implementor
specific and hidden to application developers.

Code Review:
https://review.source.android.com/#change,17364
From 7452bce8defc06a34612b25ace2ef802c0579a83 Mon Sep 17 00:00:00 2001
From: Jim Huang 
Date: Wed, 20 Apr 2011 04:53:30 +0800
Subject: [PATCH] Hide internal symbol __bionic_brk used by brk() and sbrk()

__bionic_brk was shared by brk() and sbrk(), which should be implementor
specific and hidden to application developers.

Change-Id: Iffe6ab3783e297d919a15812ac4910141a3ff066
---
 libc/unistd/brk.c  |1 +
 libc/unistd/sbrk.c |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libc/unistd/brk.c b/libc/unistd/brk.c
index bf2f108..5cc28d3 100644
--- a/libc/unistd/brk.c
+++ b/libc/unistd/brk.c
@@ -30,6 +30,7 @@
 #include 
 
 /* shared with sbrk.c */
+__LIBC_HIDDEN__
 char *__bionic_brk;
 
 int brk(void*  end_data)
diff --git a/libc/unistd/sbrk.c b/libc/unistd/sbrk.c
index a112b6c..7fc21b9 100644
--- a/libc/unistd/sbrk.c
+++ b/libc/unistd/sbrk.c
@@ -32,7 +32,7 @@
 #define  SBRK_ALIGN  32
 
 /* shared with brk() implementation */
-char*   __bionic_brk;
+extern char*   __bionic_brk;
 
 void *sbrk(ptrdiff_t increment)
 {
-- 
1.7.4.1

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


[PATCH android/bionic 3/3] Hide libm private symbols using GCC visibility pragma

2011-04-19 Thread Jim Huang
Following the visibility changes in libc.so, this patch attempts to hide
private symbols in libm.so.

Reference code size measurements for HTC Passion:
$ arm-eabi-size out/target/product/passion/system/lib/libm.so

[before]
   textdata bss dec hex filename
  88423 256  32   88711   15a87
out/target/product/passion/system/lib/libm.so

[after]
   textdata bss dec hex filename
  87950 256  32   88238   158ae
out/target/product/passion/system/lib/libm.so

Code Review:
https://review.source.android.com/#change,17358
From 331af85e9694c4c9247e39716f97ede1a62ee9ce Mon Sep 17 00:00:00 2001
From: Jim Huang 
Date: Wed, 20 Apr 2011 05:02:10 +0800
Subject: [PATCH] Hide libm private symbols using GCC visibility pragma

Following the visibility changes in libc.so, this patch attempts to hide
private symbols in libm.so.

Reference code size measurements for HTC Passion:
$ arm-eabi-size out/target/product/passion/system/lib/libm.so

[before]
   text	   data	bss	dec	hex	filename
  88423	256	 32	  88711	  15a87	out/target/product/passion/system/lib/libm.so

[after]
   text	   data	bss	dec	hex	filename
  87950	256	 32	  88238	  158ae	out/target/product/passion/system/lib/libm.so

Change-Id: I51841a9f5d7b7663b95ebf5c1bd17d1ec9a6c1b6
---
 libm/src/math_private.h |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libm/src/math_private.h b/libm/src/math_private.h
index 5f6e088..8c9f04f 100644
--- a/libm/src/math_private.h
+++ b/libm/src/math_private.h
@@ -20,6 +20,8 @@
 #include 
 #include 
 
+#include 
+
 /*
  * The original fdlibm code used statements like:
  *	n0 = ((*(int*)&one)>>29)^1;		* index of high word *
@@ -270,4 +272,6 @@ float	__kernel_cosdf(double);
 float	__kernel_tandf(double,int);
 int	__kernel_rem_pio2f(float*,float*,int,int,int,const int*);
 
+#include 
+
 #endif /* !_MATH_PRIVATE_H_ */
-- 
1.7.4.1

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


Re: [RFF] Patch tracking/metrics

2011-04-19 Thread James Westby
On Wed, 13 Apr 2011 14:54:55 +1200, Michael Hope  
wrote:
> Hmm.  We already do patch tracking in Linaro GCC to make sure that all
> patches go upstream.  It's a manual process as the GCC workflow itself
> is very manual.
> 
> I don't want to manually update two places when a patch changes state.
>  How can we merge these systems?

The original plan from UDS was to start from something like your system
and extend it to other teams. That changed when patc...@linaro.org was
proposed in Dallas.

We can perhaps modify your script to create patches in patchwork rather
than bugs. I fear that may be a bit simplistic for your case though? Is
there a one-to-one correspondance between bugs and "patches" that are
being sent upstream?

In addition, what things do you need to track about each patch? It may
be that patchwork doesn't have all the fields needed to model your
workflow.

Thanks,

James

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


Re: [PATCH 0/5] consolidate sdhci pltfm & OF drivers and get them self registered

2011-04-19 Thread Kyungmin Park
On Wed, Apr 20, 2011 at 2:47 AM, Wolfram Sang  wrote:
>
>> BTW, Are there reason to omit the sdhci-s3c.c? Maybe Mr. Jung will handle it.
>
> The difference is that sdhci-s3c.c was more like a fork of sdhci-pltfm while
> the others were users of it. With the new interface, s3c can be converted 
> using
> pltfm more easily. If somebody is willing to do that, this is very much
> welcome. I'd suggest waiting for Shawn's interface to stabilize, though.
Okay Thanks, we will prepare it.
>
> Regards,
>
>   Wolfram
>
> --
> Pengutronix e.K.                           | Wolfram Sang                |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>

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


patch set for powerdebug working items

2011-04-19 Thread yong . shen

The first two patches had been post long time before, so I did not add 'v2' to 
them.
They includes some comments from Daniel Lezcano.
The last two patches are for working items defined for powerdebug.

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


[PATCH 1/4] resolve clock_info reallocationg issue

2011-04-19 Thread yong . shen
From: Yong Shen 

everytime when screen refresh, the clock_info data stucture will
be reacclocated, which does not make sence. This patch addresses
this issue.

Signed-off-by: Yong Shen 
---
 clocks.c |  204 --
 clocks.h |3 +-
 powerdebug.c |2 +
 powerdebug.h |3 +-
 4 files changed, 133 insertions(+), 79 deletions(-)

diff --git a/clocks.c b/clocks.c
index b556644..dc5c03b 100644
--- a/clocks.c
+++ b/clocks.c
@@ -133,18 +133,18 @@ static void dump_parent(struct clock_info *clk, int line, 
bool dump)
 static struct clock_info *find_clock(struct clock_info *clk, char *clkarg)
 {
int i;
-   struct clock_info *ret = clk;
+   struct clock_info *ret = clk, *tmp;
 
if (!strcmp(clk->name, clkarg))
return ret;
 
if (clk->children) {
-   for (i = 0; i < clk->num_children; i++) {
-   if (!strcmp(clk->children[i]->name, clkarg))
-   return clk->children[i];
+   for (tmp = clk->children, i = 0; i < clk->num_children; i++, 
tmp = tmp->buddy) {
+   if (!strcmp(tmp->name, clkarg))
+   return tmp;
}
-   for (i = 0; i < clk->num_children; i++) {
-   ret = find_clock(clk->children[i], clkarg);
+   for (tmp = clk->children, i = 0; i < clk->num_children; i++, 
tmp = tmp->buddy) {
+   ret = find_clock(tmp, clkarg);
if (ret)
return ret;
}
@@ -194,51 +194,11 @@ void find_parents_for_clock(char *clkname, int complete)
dump_all_parents(clkname, false);
 }
 
-static void destroy_clocks_info_recur(struct clock_info *clock)
-{
-   int i;
-
-   if (clock && clock->num_children) {
-   for (i = (clock->num_children - 1); i >= 0; i--) {
-   fflush(stdin);
-   destroy_clocks_info_recur(clock->children[i]);
-   if (!i) {
-   free(clock->children);
-   clock->children = NULL;
-   clock->num_children = 0;
-   }
-   }
-   }
-}
-
-static void destroy_clocks_info(void)
-{
-   int i;
-
-   if (!clocks_info)
-   return;
-
-   if (clocks_info->num_children) {
-   for (i = (clocks_info->num_children - 1); i >= 0 ; i--) {
-   destroy_clocks_info_recur(clocks_info->children[i]);
-   if (!i) {
-   free(clocks_info->children);
-   clocks_info->children = NULL;
-   }
-   }
-   }
-   clocks_info->num_children = 0;
-   free(clocks_info);
-   clocks_info = NULL;
-}
-
-
 int read_and_print_clock_info(int verbose, int hrow, int selected)
 {
print_one_clock(0, "Reading Clock Tree ...", 1, 1);
 
if (!old_clock_line_no || selected == REFRESH_WINDOW) {
-   destroy_clocks_info();
read_clock_info(clk_dir_path);
}
 
@@ -280,11 +240,12 @@ static void prepare_name_str(char *namestr, struct 
clock_info *clock)
 static void collapse_all_subclocks(struct clock_info *clock)
 {
int i;
+   struct clock_info *tmp;
 
clock->expanded = 0;
if (clock->num_children)
-   for (i = 0; i < clock->num_children; i++)
-   collapse_all_subclocks(clock->children[i]);
+   for (tmp = clock->children, i = 0; i < clock->num_children; 
i++, tmp = tmp->buddy)
+   collapse_all_subclocks(tmp);
 }
 
 static void add_clock_details_recur(struct clock_info *clock,
@@ -295,6 +256,7 @@ static void add_clock_details_recur(struct clock_info 
*clock,
char rate_str[64];
char name_str[256];
double drate = (double)clock->rate;
+   struct clock_info *tmp;
 
if (drate > 1000 && drate < 100) {
unit = "KHz";
@@ -324,23 +286,23 @@ static void add_clock_details_recur(struct clock_info 
*clock,
}
 
if (clock->expanded && clock->num_children)
-   for (i = 0; i < clock->num_children; i++)
-   add_clock_details_recur(clock->children[i],
-   hrow, selected);
+   for (tmp = clock->children, i = 0; i < clock->num_children; 
i++, tmp = tmp->buddy)
+   add_clock_details_recur(tmp, hrow, selected);
+
strcpy(clock_lines[clock_line_no], "");
 }
 
 void print_clock_info(int verbose, int hrow, int selected)
 {
int i, count = 0, delta;
+   struct clock_info *tmp;
 
(void)verbose;
 
print_clock_header();
 
-   for (i = 0; i < clocks_info->num_children; i++)
-   add_clock_details_recur(clocks_

[PATCH 2/4] Utilize inotify to detect debugfs changes

2011-04-19 Thread yong . shen
From: Yong Shen 

Signed-off-by: Yong Shen 
---
 clocks.c |   56 +++-
 1 files changed, 55 insertions(+), 1 deletions(-)

diff --git a/clocks.c b/clocks.c
index dc5c03b..25588f7 100644
--- a/clocks.c
+++ b/clocks.c
@@ -16,12 +16,18 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include "powerdebug.h"
 #include "clocks.h"
 
 #define MAX_LINES 120
 
+static int inotify_fd;
+static int inotify_wd;
+static struct pollfd fds;
+
 static char clk_dir_path[PATH_MAX];
 static int  bold[MAX_LINES];
 static char clock_lines[MAX_LINES][128];
@@ -58,11 +64,56 @@ int clock_init(void)
if (locate_debugfs(clk_dir_path))
return -1;
 
+   inotify_fd = inotify_init();
+   if ( inotify_fd < 0 ) {
+   fprintf(stderr, "inotify_init error.\n" );
+   return -1;
+   }
+
+   inotify_wd = inotify_add_watch(inotify_fd, clk_dir_path, 
+   IN_ALL_EVENTS );
+
+   fds.fd = inotify_fd;
+   fds.events = POLLIN;
+
sprintf(clk_dir_path, "%s/clock", clk_dir_path);
 
return access(clk_dir_path, F_OK);
 }
 
+#define EVENT_SIZE  ( sizeof (struct inotify_event) )
+#define BUF_LEN ( 10 * ( EVENT_SIZE + 16 ) )
+
+static int debugfs_changed(void)
+{
+   int length, i = 0;
+   char buffer[BUF_LEN];
+
+   if (inotify_fd <= 0) {
+   return 1;
+   }
+
+   poll(&fds, 1, 1);
+   if (fds.revents != POLLIN) {
+   return 0;
+   }
+
+   length = read(inotify_fd, buffer, BUF_LEN);
+
+   if (length < 0)
+   return 0;
+
+   while (i < length) {
+   struct inotify_event *event = (struct inotify_event *) 
&buffer[i];
+   if (event->mask & IN_ALL_EVENTS)
+   return 1;
+
+   i += EVENT_SIZE + event->len;
+   }
+
+   return 0;
+}
+
 static int file_read_from_format(char *file, int *value, const char *format)
 {
FILE *f;
@@ -379,7 +430,8 @@ static int clk_number_recursive(char *clk_path)
 
 static int get_clk_number(char *clk_path)
 {
-   if ((max_clk_num != 0)) /* no nodes have been added */
+   /* no nodes have been added */
+   if ((max_clk_num != 0) && (!debugfs_changed()))
return max_clk_num;
else {
max_clk_num = 0;
@@ -429,6 +481,8 @@ static void release_all_clk_info_mem(void)
 void clock_finalize(void)
 {
release_all_clk_info_mem();
+   inotify_rm_watch(inotify_fd, inotify_wd);
+   close(inotify_fd);
 }
 
 
-- 
1.7.0.4


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


[PATCH 3/4] add sorting feature into powerdebug

2011-04-19 Thread yong . shen
From: Yong Shen 

push 'S' key to switch to 'sorting' mode, all the clocks will be sorted
by their name.

Signed-off-by: Yong Shen 
---
 clocks.c |  140 +-
 display.c|   16 ---
 powerdebug.c |   25 +-
 powerdebug.h |   17 ++-
 4 files changed, 136 insertions(+), 62 deletions(-)

diff --git a/clocks.c b/clocks.c
index 25588f7..ac8f411 100644
--- a/clocks.c
+++ b/clocks.c
@@ -31,8 +31,11 @@ static struct pollfd fds;
 static char clk_dir_path[PATH_MAX];
 static int  bold[MAX_LINES];
 static char clock_lines[MAX_LINES][128];
+static char clock_lines_ordered[MAX_LINES][128];
 static int clock_line_no;
 static int old_clock_line_no;
+static struct clock_info *clk_head;
+static unsigned int max_node_num, max_clk_num, alloc_index;
 
 static int locate_debugfs(char *clk_path)
 {
@@ -245,30 +248,6 @@ void find_parents_for_clock(char *clkname, int complete)
dump_all_parents(clkname, false);
 }
 
-int read_and_print_clock_info(int verbose, int hrow, int selected)
-{
-   print_one_clock(0, "Reading Clock Tree ...", 1, 1);
-
-   if (!old_clock_line_no || selected == REFRESH_WINDOW) {
-   read_clock_info(clk_dir_path);
-   }
-
-   if (!clocks_info->num_children) {
-   fprintf(stderr, "powerdebug: No clocks found. Exiting..\n");
-   exit(1);
-   }
-
-   if (selected == CLOCK_SELECTED)
-   selected = 1;
-   else
-   selected = 0;
-
-   print_clock_info(verbose, hrow, selected);
-   hrow = (hrow < old_clock_line_no) ? hrow : old_clock_line_no - 1;
-
-   return hrow;
-}
-
 static int calc_delta_screen_size(int hrow)
 {
if (hrow >= (maxy - 3))
@@ -277,15 +256,18 @@ static int calc_delta_screen_size(int hrow)
return 0;
 }
 
-static void prepare_name_str(char *namestr, struct clock_info *clock)
+static void prepare_name_str(char *namestr, struct clock_info *clock, struct 
powerdebug_options *options)
 {
int i;
 
-   strcpy(namestr, "");
-   if (clock->level > 1)
-   for (i = 0; i < (clock->level - 1); i++)
-   strcat(namestr, "  ");
-   strcat(namestr, clock->name);
+   if (options->sorting == CLOCK_NO_SORT) {
+   strcpy(namestr, "");
+   if (clock->level > 1)
+   for (i = 0; i < (clock->level - 1); i++)
+   strcat(namestr, "  ");
+   strcat(namestr, clock->name);
+   } else
+   strcpy(namestr, clock->name);
 }
 
 static void collapse_all_subclocks(struct clock_info *clock)
@@ -300,7 +282,7 @@ static void collapse_all_subclocks(struct clock_info *clock)
 }
 
 static void add_clock_details_recur(struct clock_info *clock,
-   int hrow, int selected)
+   int hrow, int selected, struct 
powerdebug_options *options)
 {
int i;
char *unit = " Hz";
@@ -323,7 +305,8 @@ static void add_clock_details_recur(struct clock_info 
*clock,
bold[clock_line_no] = 0;
 
sprintf(rate_str, "%.2f %s", drate, unit);
-   prepare_name_str(name_str, clock);
+   prepare_name_str(name_str, clock, options);
+
sprintf(clock_lines[clock_line_no++], "%-55s %-4d  %-12s %-12d %-12d",
name_str, clock->flags, rate_str, clock->usecount,
clock->num_children);
@@ -336,24 +319,102 @@ static void add_clock_details_recur(struct clock_info 
*clock,
selected = 0;
}
 
-   if (clock->expanded && clock->num_children)
+   if ((options->sorting == CLOCK_SORT) || (clock->expanded && 
clock->num_children))
for (tmp = clock->children, i = 0; i < clock->num_children; 
i++, tmp = tmp->buddy)
-   add_clock_details_recur(tmp, hrow, selected);
+   add_clock_details_recur(tmp, hrow, selected, options);
 
strcpy(clock_lines[clock_line_no], "");
 }
 
-void print_clock_info(int verbose, int hrow, int selected)
+static void clock_sort_out(void)
+{
+   int i, j, tmp;
+
+   for (j = 0; j < max_clk_num; j++) {
+   for (i = 0; i < max_clk_num; i++)
+   if (clock_lines[i][0] != '\0') {
+   tmp = i;
+   break;
+   }
+
+   for (i = tmp + 1; i < max_clk_num; i++) {
+   if (clock_lines[i][0] == '\0')
+   continue;
+   if (strcmp(clock_lines[tmp], clock_lines[i]) > 0)
+   tmp = i;
+   }
+   strcpy(clock_lines_ordered[j], clock_lines[tmp]);
+   clock_lines[tmp][0] = '\0';
+   }
+}
+
+static void print_clock_info_sorting(struct powerdebug_options *options, int 
hrow, int selected)
 {
int i, count = 0, delta;
struct clock_info *tmp;

[PATCH 4/4] Make 'status' and 'state' of regulator a little bit clearer

2011-04-19 Thread yong . shen
From: Yong Shen 

Add a simple postfix to 'status' and 'state' when displaying
regulator information, to emphasis that 'status' is about hardware
status while 'state' is a software concept.

Signed-off-by: Yong Shen 
---
 display.c   |4 ++--
 regulator.c |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/display.c b/display.c
index 2f7d655..5d30765 100644
--- a/display.c
+++ b/display.c
@@ -201,8 +201,8 @@ void show_regulator_info(struct regulator_info *reg_info, 
int nr_reg, int verbos
werase(regulator_win);
wattron(regulator_win, A_BOLD);
print(regulator_win, 0, 0, "Name");
-   print(regulator_win, 12, 0, "Status");
-   print(regulator_win, 24, 0, "State");
+   print(regulator_win, 12, 0, "Status(HW)");
+   print(regulator_win, 24, 0, "State(SW)");
print(regulator_win, 36, 0, "Type");
print(regulator_win, 48, 0, "Users");
print(regulator_win, 60, 0, "Microvolts");
diff --git a/regulator.c b/regulator.c
index 60529ed..8036e32 100644
--- a/regulator.c
+++ b/regulator.c
@@ -64,9 +64,9 @@ void regulator_print_info(struct regulator_info *reg_info, 
int nr_reg, int verbo
printf("Regulator %d:\n", i + 1);
print_string_val("name", reg_info[i].name);
if (strcmp(reg_info[i].status, ""))
-   print_string_val("status", reg_info[i].status);
+   print_string_val("status(HW)", reg_info[i].status);
if (strcmp(reg_info[i].state, ""))
-   print_string_val("state", reg_info[i].state);
+   print_string_val("state(SW)", reg_info[i].state);
 
if (!verbose)
continue;
-- 
1.7.0.4


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