[PATCH v4] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Per Forlin
Optimize performance for single irq

Changes since v2.
 * Rebase on mmc-next, change of line numbers no code changes.

Stefan Nilsson XK (1):
  sdio: optimized SDIO IRQ handling for single irq

 drivers/mmc/core/sdio_irq.c |   33 -
 include/linux/mmc/card.h|1 +
 2 files changed, 33 insertions(+), 1 deletions(-)

-- 
1.7.4.1


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


[PATCH v4] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Per Forlin
From: Stefan Nilsson XK 

If there is only 1 function interrupt registered it is possible to
improve performance by directly calling the irq handler
and avoiding the overhead of reading the CCCR registers.

Signed-off-by: Per Forlin 
Acked-by: Ulf Hansson 
Reviewed-by: Nicolas Pitre 
---
 drivers/mmc/core/sdio_irq.c |   33 -
 include/linux/mmc/card.h|1 +
 2 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c
index b300161..03ead02 100644
--- a/drivers/mmc/core/sdio_irq.c
+++ b/drivers/mmc/core/sdio_irq.c
@@ -31,6 +31,17 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
 {
int i, ret, count;
unsigned char pending;
+   struct sdio_func *func;
+
+   /*
+* Optimization, if there is only 1 function interrupt registered
+* call irq handler directly
+*/
+   func = card->sdio_single_irq;
+   if (func) {
+   func->irq_handler(func);
+   return 1;
+   }
 
ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_INTx, 0, &pending);
if (ret) {
@@ -42,7 +53,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
count = 0;
for (i = 1; i <= 7; i++) {
if (pending & (1 << i)) {
-   struct sdio_func *func = card->sdio_func[i - 1];
+   func = card->sdio_func[i - 1];
if (!func) {
printk(KERN_WARNING "%s: pending IRQ for "
"non-existent function\n",
@@ -186,6 +197,24 @@ static int sdio_card_irq_put(struct mmc_card *card)
return 0;
 }
 
+/* If there is only 1 function registered set sdio_single_irq */
+static void sdio_single_irq_set(struct mmc_card *card)
+{
+   struct sdio_func *func;
+   int i;
+
+   card->sdio_single_irq = NULL;
+   if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
+   card->host->sdio_irqs == 1)
+   for (i = 0; i < card->sdio_funcs; i++) {
+  func = card->sdio_func[i];
+  if (func && func->irq_handler) {
+  card->sdio_single_irq = func;
+  break;
+  }
+  }
+}
+
 /**
  * sdio_claim_irq - claim the IRQ for a SDIO function
  * @func: SDIO function
@@ -227,6 +256,7 @@ int sdio_claim_irq(struct sdio_func *func, 
sdio_irq_handler_t *handler)
ret = sdio_card_irq_get(func->card);
if (ret)
func->irq_handler = NULL;
+   sdio_single_irq_set(func->card);
 
return ret;
 }
@@ -251,6 +281,7 @@ int sdio_release_irq(struct sdio_func *func)
if (func->irq_handler) {
func->irq_handler = NULL;
sdio_card_irq_put(func->card);
+   sdio_single_irq_set(func->card);
}
 
ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IENx, 0, ®);
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index d8dffc9..4910dec 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -191,6 +191,7 @@ struct mmc_card {
struct sdio_cccrcccr;   /* common card info */
struct sdio_cis cis;/* common tuple info */
struct sdio_func*sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions 
(devices) */
+   struct sdio_func*sdio_single_irq; /* SDIO function when only 
one IRQ active */
unsignednum_info;   /* number of info strings */
const char  **info; /* info strings */
struct sdio_func_tuple  *tuples;/* unknown common tuples */
-- 
1.7.4.1


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


Re: [PATCH v4] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Chris Ball
Hi Per,

On Wed, May 11 2011, Per Forlin wrote:
> Optimize performance for single irq
>
> Changes since v2.
>  * Rebase on mmc-next, change of line numbers no code changes.
>
> Stefan Nilsson XK (1):
>   sdio: optimized SDIO IRQ handling for single irq
>
>  drivers/mmc/core/sdio_irq.c |   33 -
>  include/linux/mmc/card.h|1 +
>  2 files changed, 33 insertions(+), 1 deletions(-)

Odd, still doesn't apply here:

error: patch failed: drivers/mmc/core/sdio_irq.c:42
error: drivers/mmc/core/sdio_irq.c: patch does not apply

patch -p1 says:
Hunk #2 succeeded at 53 with fuzz 1.

So this still isn't rebased onto mmc-next properly.  There haven't been
any changes to drivers/mmc/core/sdio_irq.c since 2008, though, so now
I'm wondering where you got the fuzz from..

- Chris.
-- 
Chris Ball  
One Laptop Per Child

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


[PATCH v5] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Per Forlin
Optimize performance for single irq

Changes since v4.
 * Proper rebase on mmc-next. In previous patch, a spelling-patch in sdio_irq
   was accidentally rebased on top as well causing merge conflict.

Stefan Nilsson XK (1):
  sdio: optimized SDIO IRQ handling for single irq

 drivers/mmc/core/sdio_irq.c |   33 -
 include/linux/mmc/card.h|1 +
 2 files changed, 33 insertions(+), 1 deletions(-)

-- 
1.7.4.1


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


[PATCH v5] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Per Forlin
From: Stefan Nilsson XK 

If there is only 1 function interrupt registered it is possible to
improve performance by directly calling the irq handler
and avoiding the overhead of reading the CCCR registers.

Signed-off-by: Per Forlin 
Acked-by: Ulf Hansson 
Reviewed-by: Nicolas Pitre 
---
 drivers/mmc/core/sdio_irq.c |   33 -
 include/linux/mmc/card.h|1 +
 2 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c
index bb192f9..a0890ac 100644
--- a/drivers/mmc/core/sdio_irq.c
+++ b/drivers/mmc/core/sdio_irq.c
@@ -31,6 +31,17 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
 {
int i, ret, count;
unsigned char pending;
+   struct sdio_func *func;
+
+   /*
+* Optimization, if there is only 1 function interrupt registered
+* call irq handler directly
+*/
+   func = card->sdio_single_irq;
+   if (func) {
+   func->irq_handler(func);
+   return 1;
+   }
 
ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_INTx, 0, &pending);
if (ret) {
@@ -42,7 +53,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
count = 0;
for (i = 1; i <= 7; i++) {
if (pending & (1 << i)) {
-   struct sdio_func *func = card->sdio_func[i - 1];
+   func = card->sdio_func[i - 1];
if (!func) {
printk(KERN_WARNING "%s: pending IRQ for "
"non-existant function\n",
@@ -186,6 +197,24 @@ static int sdio_card_irq_put(struct mmc_card *card)
return 0;
 }
 
+/* If there is only 1 function registered set sdio_single_irq */
+static void sdio_single_irq_set(struct mmc_card *card)
+{
+   struct sdio_func *func;
+   int i;
+
+   card->sdio_single_irq = NULL;
+   if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
+   card->host->sdio_irqs == 1)
+   for (i = 0; i < card->sdio_funcs; i++) {
+  func = card->sdio_func[i];
+  if (func && func->irq_handler) {
+  card->sdio_single_irq = func;
+  break;
+  }
+  }
+}
+
 /**
  * sdio_claim_irq - claim the IRQ for a SDIO function
  * @func: SDIO function
@@ -227,6 +256,7 @@ int sdio_claim_irq(struct sdio_func *func, 
sdio_irq_handler_t *handler)
ret = sdio_card_irq_get(func->card);
if (ret)
func->irq_handler = NULL;
+   sdio_single_irq_set(func->card);
 
return ret;
 }
@@ -251,6 +281,7 @@ int sdio_release_irq(struct sdio_func *func)
if (func->irq_handler) {
func->irq_handler = NULL;
sdio_card_irq_put(func->card);
+   sdio_single_irq_set(func->card);
}
 
ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IENx, 0, ®);
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index d8dffc9..4910dec 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -191,6 +191,7 @@ struct mmc_card {
struct sdio_cccrcccr;   /* common card info */
struct sdio_cis cis;/* common tuple info */
struct sdio_func*sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions 
(devices) */
+   struct sdio_func*sdio_single_irq; /* SDIO function when only 
one IRQ active */
unsignednum_info;   /* number of info strings */
const char  **info; /* info strings */
struct sdio_func_tuple  *tuples;/* unknown common tuples */
-- 
1.7.4.1


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


Re: [PATCH v5] sdio: optimized SDIO IRQ handling for single irq

2011-05-11 Thread Chris Ball
Hi Per,

On Wed, May 11 2011, Per Forlin wrote:
> From: Stefan Nilsson XK 
>
> If there is only 1 function interrupt registered it is possible to
> improve performance by directly calling the irq handler
> and avoiding the overhead of reading the CCCR registers.
>
> Signed-off-by: Per Forlin 
> Acked-by: Ulf Hansson 
> Reviewed-by: Nicolas Pitre 
> ---
>  drivers/mmc/core/sdio_irq.c |   33 -
>  include/linux/mmc/card.h|1 +
>  2 files changed, 33 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c
> index bb192f9..a0890ac 100644
> --- a/drivers/mmc/core/sdio_irq.c
> +++ b/drivers/mmc/core/sdio_irq.c
> @@ -31,6 +31,17 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
>  {
>   int i, ret, count;
>   unsigned char pending;
> + struct sdio_func *func;
> +
> + /*
> +  * Optimization, if there is only 1 function interrupt registered
> +  * call irq handler directly
> +  */
> + func = card->sdio_single_irq;
> + if (func) {
> + func->irq_handler(func);
> + return 1;
> + }
>  
>   ret = mmc_io_rw_direct(card, 0, 0, SDIO_CCCR_INTx, 0, &pending);
>   if (ret) {
> @@ -42,7 +53,7 @@ static int process_sdio_pending_irqs(struct mmc_card *card)
>   count = 0;
>   for (i = 1; i <= 7; i++) {
>   if (pending & (1 << i)) {
> - struct sdio_func *func = card->sdio_func[i - 1];
> + func = card->sdio_func[i - 1];
>   if (!func) {
>   printk(KERN_WARNING "%s: pending IRQ for "
>   "non-existant function\n",
> @@ -186,6 +197,24 @@ static int sdio_card_irq_put(struct mmc_card *card)
>   return 0;
>  }
>  
> +/* If there is only 1 function registered set sdio_single_irq */
> +static void sdio_single_irq_set(struct mmc_card *card)
> +{
> + struct sdio_func *func;
> + int i;
> +
> + card->sdio_single_irq = NULL;
> + if ((card->host->caps & MMC_CAP_SDIO_IRQ) &&
> + card->host->sdio_irqs == 1)
> + for (i = 0; i < card->sdio_funcs; i++) {
> +func = card->sdio_func[i];
> +if (func && func->irq_handler) {
> +card->sdio_single_irq = func;
> +break;
> +}
> +}
> +}
> +
>  /**
>   *   sdio_claim_irq - claim the IRQ for a SDIO function
>   *   @func: SDIO function
> @@ -227,6 +256,7 @@ int sdio_claim_irq(struct sdio_func *func, 
> sdio_irq_handler_t *handler)
>   ret = sdio_card_irq_get(func->card);
>   if (ret)
>   func->irq_handler = NULL;
> + sdio_single_irq_set(func->card);
>  
>   return ret;
>  }
> @@ -251,6 +281,7 @@ int sdio_release_irq(struct sdio_func *func)
>   if (func->irq_handler) {
>   func->irq_handler = NULL;
>   sdio_card_irq_put(func->card);
> + sdio_single_irq_set(func->card);
>   }
>  
>   ret = mmc_io_rw_direct(func->card, 0, 0, SDIO_CCCR_IENx, 0, ®);
> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
> index d8dffc9..4910dec 100644
> --- a/include/linux/mmc/card.h
> +++ b/include/linux/mmc/card.h
> @@ -191,6 +191,7 @@ struct mmc_card {
>   struct sdio_cccrcccr;   /* common card info */
>   struct sdio_cis cis;/* common tuple info */
>   struct sdio_func*sdio_func[SDIO_MAX_FUNCS]; /* SDIO functions 
> (devices) */
> + struct sdio_func*sdio_single_irq; /* SDIO function when only 
> one IRQ active */
>   unsignednum_info;   /* number of info strings */
>   const char  **info; /* info strings */
>   struct sdio_func_tuple  *tuples;/* unknown common tuples */

Thanks, looks good now -- pushed to mmc-next for .40.

- Chris.
-- 
Chris Ball  
One Laptop Per Child

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


Re: Usefulness of GCC's 64bit __sync_* ops on ARM

2011-05-11 Thread saeed bishara
On Sat, May 7, 2011 at 12:39 AM, Nicolas Pitre  wrote:
> On Fri, 6 May 2011, Ramana Radhakrishnan wrote:
>
>> On 6 May 2011 16:06, Ken Werner  wrote:
>> >
>> > Currently the GCC ARM backend doesn't provide a pattern to inline 64bit
>> > __sync_* functions but the compiler emits __sync_*_8 function calls [1]. 
>> > The
>> > libgcc does not provide these symbols via the usual thin wrapper around the
>> > kernel helper [2] because the ARM Linux __kernel_cmpxchg supports 32bit 
>> > only.
>> > My understanding is that for ARMv7 the GCC backend could be enhanced to 
>> > inline
>> > the __sync_* functions by using the LDREXD and STREXD instructions. But for
>> > ARMv5 we would still rely on a new kernel helper.
>>
>> It's a bit tricky with when you want to use the kernel helper for v5t,
>> so we've got to find a way of turning this on only with special knobs
>> and not by default and that's a bit tricky.
>
> What is the problem with v5t?
Hi, when I run the following on my jaunty (for armv5), I get the following


echo "void f(){__sync_synchronize();}" | gcc -O2 -x c -Wall -dA -S - -o -
.arch armv6
.eabi_attribute 27, 3
.fpu vfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 18, 4
.file   ""
.text
.align  2
.global f
.type   f, %function
f:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
@ basic block 2
bx  lr
.size   f, .-f
.ident  "GCC: (Ubuntu 4.4.1-4ubuntu9) 4.4.1"
.section.note.GNU-stack,"",%progbits

but I can see (with debugger) that the kernel helper functions are
reached. any idea how?

saeed

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


Re: [PATCH] of: clock: Avoid a NULL pointer dereference

2011-05-11 Thread Grant Likely
On Wed, May 11, 2011 at 5:57 AM, Rajendra Nayak  wrote:
> Quite often in the kernel, there are instances of clk_get calls
> being made with a NULL struct device pointer being passed.
> Not checking for such cases could lead to a NULL pointer
> dereference.
>
> Signed-off-by: Rajendra Nayak 

Thanks Rajendra,

I've already got a fix for this in my devicetree/test branch.

g.


> ---
> based on git://git.secretlab.ca/git/linux-2.6 devicetree/test
>
>  drivers/of/clock.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/of/clock.c b/drivers/of/clock.c
> index a49f79f..cbca319 100644
> --- a/drivers/of/clock.c
> +++ b/drivers/of/clock.c
> @@ -91,7 +91,7 @@ static struct clk *__of_clk_get_from_provider(struct 
> device_node *np, const char
>
>  struct clk *of_clk_get(struct device *dev, const char *id)
>  {
> -       struct device_node *provnode;
> +       struct device_node *provnode, *of_node;
>        u32 provhandle;
>        int sz;
>        struct clk *clk;
> @@ -103,7 +103,8 @@ struct clk *of_clk_get(struct device *dev, const char *id)
>        dev_dbg(dev, "Looking up %s-clock from device tree\n", id);
>
>        snprintf(prop_name, 32, "%s-clock", id ? id : "bus");
> -       prop = of_get_property(dev->of_node, prop_name, &sz);
> +       of_node = dev ? dev->of_node : NULL;
> +       prop = of_get_property(of_node, prop_name, &sz);
>        if (!prop || sz < 4)
>                return NULL;
>
> --
> 1.7.0.4
>
>



-- 
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


[PATCH v6 5/5] dt: add documentation of ARM dt boot interface

2011-05-11 Thread Grant Likely
v6: typo fixes
v5: clarified that dtb should be aligned on a 64 bit boundary in RAM.
v3: added details to Documentation/arm/Booting

Acked-by: Tony Lindgren 
Signed-off-by: Grant Likely 
---
 Documentation/arm/Booting   |   33 ++--
 Documentation/devicetree/booting-without-of.txt |   48 +--
 2 files changed, 73 insertions(+), 8 deletions(-)

diff --git a/Documentation/arm/Booting b/Documentation/arm/Booting
index 7685029..4e686a2 100644
--- a/Documentation/arm/Booting
+++ b/Documentation/arm/Booting
@@ -65,13 +65,19 @@ looks at the connected hardware is beyond the scope of this 
document.
 The boot loader must ultimately be able to provide a MACH_TYPE_xxx
 value to the kernel. (see linux/arch/arm/tools/mach-types).
 
-
-4. Setup the kernel tagged list

+4. Setup boot data
+--
 
 Existing boot loaders: OPTIONAL, HIGHLY RECOMMENDED
 New boot loaders:  MANDATORY
 
+The boot loader must provide either a tagged list or a dtb image for
+passing configuration data to the kernel.  The physical address of the
+boot data is passed to the kernel in register r2.
+
+4a. Setup the kernel tagged list
+
+
 The boot loader must create and initialise the kernel tagged list.
 A valid tagged list starts with ATAG_CORE and ends with ATAG_NONE.
 The ATAG_CORE tag may or may not be empty.  An empty ATAG_CORE tag
@@ -101,6 +107,24 @@ The tagged list must be placed in a region of memory where 
neither
 the kernel decompressor nor initrd 'bootp' program will overwrite
 it.  The recommended placement is in the first 16KiB of RAM.
 
+4b. Setup the device tree
+-
+
+The boot loader must load a device tree image (dtb) into system ram
+at a 64bit aligned address and initialize it with the boot data.  The
+dtb format is documented in Documentation/devicetree/booting-without-of.txt.
+The kernel will look for the dtb magic value of 0xd00dfeed at the dtb
+physical address to determine if a dtb has been passed instead of a
+tagged list.
+
+The boot loader must pass at a minimum the size and location of the
+system memory, and the root filesystem location.  The dtb must be
+placed in a region of memory where the kernel decompressor will not
+overwrite it.  The recommended placement is in the first 16KiB of RAM
+with the caveat that it may not be located at physical address 0 since
+the kernel interprets a value of 0 in r2 to mean neither a tagged list
+nor a dtb were passed.
+
 5. Calling the kernel image
 ---
 
@@ -125,7 +149,8 @@ In either case, the following conditions must be met:
 - CPU register settings
   r0 = 0,
   r1 = machine type number discovered in (3) above.
-  r2 = physical address of tagged list in system RAM.
+  r2 = physical address of tagged list in system RAM, or
+   physical address of device tree block (dtb) in system RAM
 
 - CPU mode
   All forms of interrupts must be disabled (IRQs and FIQs)
diff --git a/Documentation/devicetree/booting-without-of.txt 
b/Documentation/devicetree/booting-without-of.txt
index 50619a0..7c1329d 100644
--- a/Documentation/devicetree/booting-without-of.txt
+++ b/Documentation/devicetree/booting-without-of.txt
@@ -12,8 +12,9 @@ Table of Contents
 =
 
   I - Introduction
-1) Entry point for arch/powerpc
-2) Entry point for arch/x86
+1) Entry point for arch/arm
+2) Entry point for arch/powerpc
+3) Entry point for arch/x86
 
   II - The DT block format
 1) Header
@@ -148,7 +149,46 @@ upgrades without significantly impacting the kernel code 
or cluttering
 it with special cases.
 
 
-1) Entry point for arch/powerpc
+1) Entry point for arch/arm
+---
+
+   There is one single entry point to the kernel, at the start
+   of the kernel image. That entry point supports two calling
+   conventions.  A summary of the interface is described here.  A full
+   description of the boot requirements is documented in
+   Documentation/arm/Booting
+
+a) ATAGS interface.  Minimal information is passed from firmware
+to the kernel with a tagged list of predefined parameters.
+
+r0 : 0
+
+r1 : Machine type number
+
+r2 : Physical address of tagged list in system RAM
+
+b) Entry with a flattened device-tree block.  Firmware loads the
+physical address of the flattened device tree block (dtb) into r2,
+r1 is not used, but it is considered good practise to use a valid
+machine number as described in Documentation/arm/Booting.
+
+r0 : 0
+
+r1 : Valid machine type number.  When using a device tree,
+a single machine type number will often be assigned to
+represent a class or family of SoCs.
+
+r2 : physical pointer to the device-tree block
+(defined in chapter II) in 

[PATCH v6 1/5] arm/dt: Make __vet_atags also accept a dtb image

2011-05-11 Thread Grant Likely
The dtb is passed to the kernel via register r2, which is the same
method that is used to pass an atags pointer.  This patch modifies
__vet_atags to not clear r2 when it encounters a dtb image.

v2: fixed bugs pointed out by Nicolas Pitre

Tested-by: Tony Lindgren 
Signed-off-by: Grant Likely 
---
 arch/arm/kernel/head-common.S |   24 ++--
 arch/arm/kernel/head.S|8 
 2 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index c84b57d..854bd22 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -15,6 +15,12 @@
 #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2)
 #define ATAG_CORE_SIZE_EMPTY ((2*4) >> 2)
 
+#ifdef CONFIG_CPU_BIG_ENDIAN
+#define OF_DT_MAGIC 0xd00dfeed
+#else
+#define OF_DT_MAGIC 0xedfe0dd0 /* 0xd00dfeed in big-endian */
+#endif
+
 /*
  * Exception handling.  Something went wrong and we can't proceed.  We
  * ought to tell the user, but since we don't have any guarantee that
@@ -28,20 +34,26 @@
 
 /* Determine validity of the r2 atags pointer.  The heuristic requires
  * that the pointer be aligned, in the first 16k of physical RAM and
- * that the ATAG_CORE marker is first and present.  Future revisions
+ * that the ATAG_CORE marker is first and present.  If CONFIG_OF_FLATTREE
+ * is selected, then it will also accept a dtb pointer.  Future revisions
  * of this function may be more lenient with the physical address and
  * may also be able to move the ATAGS block if necessary.
  *
  * Returns:
- *  r2 either valid atags pointer, or zero
+ *  r2 either valid atags pointer, valid dtb pointer, or zero
  *  r5, r6 corrupted
  */
 __vet_atags:
tst r2, #0x3@ aligned?
bne 1f
 
-   ldr r5, [r2, #0]@ is first tag ATAG_CORE?
-   cmp r5, #ATAG_CORE_SIZE
+   ldr r5, [r2, #0]
+#ifdef CONFIG_OF_FLATTREE
+   ldr r6, =OF_DT_MAGIC@ is it a DTB?
+   cmp r5, r6
+   beq 2f
+#endif
+   cmp r5, #ATAG_CORE_SIZE @ is first tag ATAG_CORE?
cmpne   r5, #ATAG_CORE_SIZE_EMPTY
bne 1f
ldr r5, [r2, #4]
@@ -49,7 +61,7 @@ __vet_atags:
cmp r5, r6
bne 1f
 
-   mov pc, lr  @ atag pointer is ok
+2: mov pc, lr  @ atag/dtb pointer is ok
 
 1: mov r2, #0
mov pc, lr
@@ -61,7 +73,7 @@ ENDPROC(__vet_atags)
  *
  *  r0  = cp#15 control register
  *  r1  = machine ID
- *  r2  = atags pointer
+ *  r2  = atags/dtb pointer
  *  r9  = processor ID
  */
__INIT
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index c9173cf..a5e5c5b 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -59,7 +59,7 @@
  *
  * This is normally called from the decompressor code.  The requirements
  * are: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,
- * r1 = machine nr, r2 = atags pointer.
+ * r1 = machine nr, r2 = atags or dtb pointer.
  *
  * This code is mostly position independent, so if you link the kernel at
  * 0xc0008000, you call this at __pa(0xc0008000).
@@ -91,7 +91,7 @@ ENTRY(stext)
 #endif
 
/*
-* r1 = machine no, r2 = atags,
+* r1 = machine no, r2 = atags or dtb,
 * r8 = phys_offset, r9 = cpuid, r10 = procinfo
 */
bl  __vet_atags
@@ -339,7 +339,7 @@ __secondary_data:
  *
  *  r0  = cp#15 control register
  *  r1  = machine ID
- *  r2  = atags pointer
+ *  r2  = atags or dtb pointer
  *  r4  = page table pointer
  *  r9  = processor ID
  *  r13 = *virtual* address to jump to upon completion
@@ -376,7 +376,7 @@ ENDPROC(__enable_mmu)
  *
  *  r0  = cp#15 control register
  *  r1  = machine ID
- *  r2  = atags pointer
+ *  r2  = atags or dtb pointer
  *  r9  = processor ID
  *  r13 = *virtual* address to jump to upon completion
  *


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


[PATCH v6 3/5] arm/dt: consolidate atags setup into setup_machine_atags

2011-05-11 Thread Grant Likely
In preparation for adding device tree support, this patch consolidates
all of the atag-specific setup into a single function.

v5: - drop double printk("Machine; %s\n", ...); call.
- leave copying boot_command_line in setup_arch() since it isn't
  atags specific.
v4: - adapt to the removal of lookup_machine_type()
- break out dump of machine_desc table into dump_machine_table()
  because the device tree probe code will use it.
- Add for_each_machine_desc() macro

Tested-by: Tony Lindgren 
Signed-off-by: Grant Likely 
---
 arch/arm/include/asm/mach/arch.h |7 
 arch/arm/kernel/setup.c  |   69 ++
 2 files changed, 47 insertions(+), 29 deletions(-)

diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index bf13b81..4764e67 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -48,6 +48,13 @@ struct machine_desc {
 extern struct machine_desc *machine_desc;
 
 /*
+ * Machine type table - also only accessible during boot
+ */
+extern struct machine_desc __arch_info_begin[], __arch_info_end[];
+#define for_each_machine_desc(p)   \
+   for (p = __arch_info_begin; p < __arch_info_end; p++)
+
+/*
  * Set of macros to define architecture features.  This is built into
  * a table by the linker.
  */
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 109997e..42c2f0c 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -439,25 +439,12 @@ void cpu_init(void)
: "r14");
 }
 
-static struct machine_desc * __init setup_machine(unsigned int nr)
+static void __init dump_machine_table(void)
 {
-   extern struct machine_desc __arch_info_begin[], __arch_info_end[];
struct machine_desc *p;
 
-   /*
-* locate machine in the list of supported machines.
-*/
-   for (p = __arch_info_begin; p < __arch_info_end; p++)
-   if (nr == p->nr) {
-   printk("Machine: %s\n", p->name);
-   return p;
-   }
-
-   early_print("\n"
-   "Error: unrecognized/unsupported machine ID (r1 = 0x%08x).\n\n"
-   "Available machine support:\n\nID (hex)\tNAME\n", nr);
-
-   for (p = __arch_info_begin; p < __arch_info_end; p++)
+   early_print("Available machine support:\n\nID (hex)\tNAME\n");
+   for_each_machine_desc(p)
early_print("%08x\t%s\n", p->nr, p->name);
 
early_print("\nPlease check your kernel config and/or bootloader.\n");
@@ -796,23 +783,29 @@ static void __init squash_mem_tags(struct tag *tag)
tag->hdr.tag = ATAG_NONE;
 }
 
-void __init setup_arch(char **cmdline_p)
+static struct machine_desc * __init setup_machine_tags(unsigned int nr)
 {
struct tag *tags = (struct tag *)&init_tags;
-   struct machine_desc *mdesc;
+   struct machine_desc *mdesc = NULL, *p;
char *from = default_command_line;
 
init_tags.mem.start = PHYS_OFFSET;
 
-   unwind_init();
-
-   setup_processor();
-   mdesc = setup_machine(machine_arch_type);
-   machine_desc = mdesc;
-   machine_name = mdesc->name;
+   /*
+* locate machine in the list of supported machines.
+*/
+   for_each_machine_desc(p)
+   if (nr == p->nr) {
+   printk("Machine: %s\n", p->name);
+   mdesc = p;
+   break;
+   }
 
-   if (mdesc->soft_reboot)
-   reboot_setup("s");
+   if (!mdesc) {
+   early_print("\nError: unrecognized/unsupported machine ID"
+   " (r1 = 0x%08x).\n\n", nr);
+   dump_machine_table(); /* does not return */
+   }
 
if (__atags_pointer)
tags = phys_to_virt(__atags_pointer);
@@ -857,14 +850,32 @@ void __init setup_arch(char **cmdline_p)
parse_tags(tags);
}
 
+   /* parse_early_param needs a boot_command_line */
+   strlcpy(boot_command_line, from, COMMAND_LINE_SIZE);
+
+   return mdesc;
+}
+
+
+void __init setup_arch(char **cmdline_p)
+{
+   struct machine_desc *mdesc;
+
+   unwind_init();
+
+   setup_processor();
+   mdesc = setup_machine_tags(machine_arch_type);
+   machine_desc = mdesc;
+   machine_name = mdesc->name;
+
+   if (mdesc->soft_reboot)
+   reboot_setup("s");
+
init_mm.start_code = (unsigned long) _text;
init_mm.end_code   = (unsigned long) _etext;
init_mm.end_data   = (unsigned long) _edata;
init_mm.brk= (unsigned long) _end;
 
-   /* parse_early_param needs a boot_command_line */
-   strlcpy(boot_command_line, from, COMMAND_LINE_SIZE);
-
/* populate cmd_line too for later use, preserving boot_command_line */
strlcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE);
*cmdline_p = cmd_line;


__

[PATCH v6 2/5] arm/dt: Allow CONFIG_OF on ARM

2011-05-11 Thread Grant Likely
Add some basic empty infrastructure for DT support on ARM.

v5: - Fix off-by-one error in size calculation of initrd
- Stop mucking with cmd_line, and load command line from dt into
  boot_command_line instead which matches the behaviour of ATAGS booting
v3: - moved cmd_line export and initrd setup to this patch to make the
  series bisectable.
- switched to alloc_bootmem_align() for allocation when
  unflattening the device tree.  memblock_alloc() was not the
  right interface.

Signed-off-by: Jeremy Kerr 
Tested-by: Tony Lindgren 
Signed-off-by: Grant Likely 
---
 arch/arm/Kconfig |7 ++
 arch/arm/include/asm/prom.h  |   25 ++
 arch/arm/include/asm/setup.h |2 ++
 arch/arm/kernel/Makefile |1 +
 arch/arm/kernel/devtree.c|   47 ++
 arch/arm/kernel/setup.c  |2 +-
 arch/arm/mm/init.c   |9 
 7 files changed, 92 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/include/asm/prom.h
 create mode 100644 arch/arm/kernel/devtree.c

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 377a7a5..efc7f3c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1687,6 +1687,13 @@ endmenu
 
 menu "Boot options"
 
+config USE_OF
+   bool "Flattened Device Tree support"
+   select OF
+   select OF_EARLY_FLATTREE
+   help
+ Include support for flattened device tree machine descriptions.
+
 # Compressed boot loader in ROM.  Yes, we really want to ask about
 # TEXT and BSS so we preserve their values in the config files.
 config ZBOOT_ROM_TEXT
diff --git a/arch/arm/include/asm/prom.h b/arch/arm/include/asm/prom.h
new file mode 100644
index 000..8f1037f
--- /dev/null
+++ b/arch/arm/include/asm/prom.h
@@ -0,0 +1,25 @@
+/*
+ *  arch/arm/include/asm/prom.h
+ *
+ *  Copyright (C) 2009 Canonical Ltd. 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+#ifndef __ASMARM_PROM_H
+#define __ASMARM_PROM_H
+
+#ifdef CONFIG_OF
+
+#include 
+#include 
+
+static inline void irq_dispose_mapping(unsigned int virq)
+{
+   return;
+}
+
+#endif /* CONFIG_OF */
+#endif /* ASMARM_PROM_H */
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index 95176af..93b4702 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -217,6 +217,8 @@ extern struct meminfo meminfo;
 #define bank_phys_end(bank)((bank)->start + (bank)->size)
 #define bank_phys_size(bank)   (bank)->size
 
+extern int arm_add_memory(phys_addr_t start, unsigned long size);
+
 #endif  /*  __KERNEL__  */
 
 #endif
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 8d95446..908c78c 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_ARM_THUMBEE) += thumbee.o
 obj-$(CONFIG_KGDB) += kgdb.o
 obj-$(CONFIG_ARM_UNWIND)   += unwind.o
 obj-$(CONFIG_HAVE_TCM) += tcm.o
+obj-$(CONFIG_OF)   += devtree.o
 obj-$(CONFIG_CRASH_DUMP)   += crash_dump.o
 obj-$(CONFIG_SWP_EMULATE)  += swp_emulate.o
 CFLAGS_swp_emulate.o   := -Wa,-march=armv7-a
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
new file mode 100644
index 000..75e3df8
--- /dev/null
+++ b/arch/arm/kernel/devtree.c
@@ -0,0 +1,47 @@
+/*
+ *  linux/arch/arm/kernel/devtree.c
+ *
+ *  Copyright (C) 2009 Canonical Ltd. 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+void __init early_init_dt_add_memory_arch(u64 base, u64 size)
+{
+   arm_add_memory(base, size);
+}
+
+void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
+{
+   return alloc_bootmem_align(size, align);
+}
+
+/**
+ * irq_create_of_mapping - Hook to resolve OF irq specifier into a Linux irq#
+ *
+ * Currently the mapping mechanism is trivial; simple flat hwirq numbers are
+ * mapped 1:1 onto Linux irq numbers.  Cascaded irq controllers are not
+ * supported.
+ */
+unsigned int irq_create_of_mapping(struct device_node *controller,
+  const u32 *intspec, unsigned int intsize)
+{
+   return intspec[0];
+}
+EXPORT_SYMBOL_GPL(irq_create_of_mapping);
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 006c1e8..109997e 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -466,7 +466,7 @@ static struct machine_desc * __init setup_machine(unsigned 
int nr)
/* can't use cpu_relax() here as it may require MMU setup */;
 }
 
-static int __init arm_add_memory(phys_addr_t start, unsigned 

[PATCH v6 4/5] arm/dt: probe for platforms via the device tree

2011-05-11 Thread Grant Likely
If a dtb is passed to the kernel then the kernel needs to iterate
through compiled-in mdescs looking for one that matches and move the
dtb data to a safe location before it gets accidentally overwritten by
the kernel.

This patch creates a new function, setup_machine_fdt() which is
analogous to the setup_machine_atags() created in the previous patch.
It does all the early setup needed to use a device tree machine
description.

v5: - Print warning with neither dtb nor atags are passed to the kernel
- Fix bug in setting of __machine_arch_type to the selected machine,
  not just the last machine in the list.
  Reported-by: Tixy 
- Copy command line directly into boot_command_line instead of cmd_line
v4: - Dump some output when a matching machine_desc cannot be found
v3: - Added processing of reserved list.
- Backed out the v2 change that copied instead of reserved the
  dtb.  dtb is reserved again and the real problem was fixed by
  using alloc_bootmem_align() for early allocation of RAM for
  unflattening the tree.
- Moved cmd_line and initrd changes to earlier patch to make series
  bisectable.
v2: Changed to save the dtb by copying into an allocated buffer.
- Since the dtb will very likely be passed in the first 16k of ram
  where the interrupt vectors live, memblock_reserve() is
  insufficient to protect the dtb data.

[based on work originally written by Jeremy Kerr ]
Tested-by: Tony Lindgren 
Signed-off-by: Grant Likely 
---
 arch/arm/include/asm/mach/arch.h |2 +
 arch/arm/include/asm/prom.h  |   12 +
 arch/arm/include/asm/setup.h |2 +
 arch/arm/kernel/devtree.c|   98 ++
 arch/arm/kernel/setup.c  |   23 +++--
 arch/arm/mm/init.c   |2 +
 6 files changed, 135 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h
index 4764e67..946f4d7 100644
--- a/arch/arm/include/asm/mach/arch.h
+++ b/arch/arm/include/asm/mach/arch.h
@@ -18,6 +18,8 @@ struct machine_desc {
unsigned intnr; /* architecture number  */
const char  *name;  /* architecture name*/
unsigned long   boot_params;/* tagged list  */
+   const char  **dt_compat;/* array of device tree
+* 'compatible' strings */
 
unsigned intnr_irqs;/* number of IRQs */
 
diff --git a/arch/arm/include/asm/prom.h b/arch/arm/include/asm/prom.h
index 8f1037f..11b8708 100644
--- a/arch/arm/include/asm/prom.h
+++ b/arch/arm/include/asm/prom.h
@@ -21,5 +21,17 @@ static inline void irq_dispose_mapping(unsigned int virq)
return;
 }
 
+extern struct machine_desc *setup_machine_fdt(unsigned int dt_phys);
+extern void arm_dt_memblock_reserve(void);
+
+#else /* CONFIG_OF */
+
+static inline struct machine_desc *setup_machine_fdt(unsigned int dt_phys)
+{
+   return NULL;
+}
+
+static inline void arm_dt_memblock_reserve(void) { }
+
 #endif /* CONFIG_OF */
 #endif /* ASMARM_PROM_H */
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h
index 93b4702..ee2ad8a 100644
--- a/arch/arm/include/asm/setup.h
+++ b/arch/arm/include/asm/setup.h
@@ -218,6 +218,8 @@ extern struct meminfo meminfo;
 #define bank_phys_size(bank)   (bank)->size
 
 extern int arm_add_memory(phys_addr_t start, unsigned long size);
+extern void early_print(const char *str, ...);
+extern void dump_machine_table(void);
 
 #endif  /*  __KERNEL__  */
 
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 75e3df8..a701e42 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -21,6 +21,8 @@
 
 #include 
 #include 
+#include 
+#include 
 
 void __init early_init_dt_add_memory_arch(u64 base, u64 size)
 {
@@ -32,6 +34,102 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 
align)
return alloc_bootmem_align(size, align);
 }
 
+void __init arm_dt_memblock_reserve(void)
+{
+   u64 *reserve_map, base, size;
+
+   if (!initial_boot_params)
+   return;
+
+   /* Reserve the dtb region */
+   memblock_reserve(virt_to_phys(initial_boot_params),
+be32_to_cpu(initial_boot_params->totalsize));
+
+   /*
+* Process the reserve map.  This will probably overlap the initrd
+* and dtb locations which are already reserved, but overlaping
+* doesn't hurt anything
+*/
+   reserve_map = ((void*)initial_boot_params) +
+   be32_to_cpu(initial_boot_params->off_mem_rsvmap);
+   while (1) {
+   base = be64_to_cpup(reserve_map++);
+   size = be64_to_cpup(reserve_map++);
+   if (!size)
+   break;
+   memblock_reserve(base, size);
+   }
+}
+
+/**
+ * setup_machine_fdt - Machine setup when an dtb was 

[PATCH v6 0/5] Basic ARM devicetree support

2011-05-11 Thread Grant Likely
Hi Russell,

Here's the current state of the device tree patches for basic
infrastructure support.  It's pretty much the same as the last series
I sent to you, except I've dropped the patches that add .dts files and
board support simply because the final location for storing .dtb files
is still up in the air.

After hearing from multiple people this week at UDS, and specifically
having a long conversation about it with tglx, I'd really think it's
time to start getting some wider testing in linux-next since it has
seemed to be quite stable for a while now.  In fact, I want to put it
in right now so that there is the /option/ of getting it into 2.6.40
with a separate pull request near the end of the merge window (I'm not
asking you to commit to merging it, but it isn't even an option if it
isn't in linux-next).

Right now it merges cleanly with linux-next and the resulting tree
builds and boots at least on qemu.  Unless you really object, I'm
going to ask Stephen to add the following branch to the /end/ of the
list of trees for linux-next so it can easily be dropped it if it
causes any problems.

git://git.secretlab.ca/git/linux-2.6 devicetree/arm-next

g.

---

Grant Likely (5):
  arm/dt: Make __vet_atags also accept a dtb image
  arm/dt: Allow CONFIG_OF on ARM
  arm/dt: consolidate atags setup into setup_machine_atags
  arm/dt: probe for platforms via the device tree
  dt: add documentation of ARM dt boot interface


 Documentation/arm/Booting   |   33 +
 Documentation/devicetree/booting-without-of.txt |   48 +++-
 arch/arm/Kconfig|7 +
 arch/arm/include/asm/mach/arch.h|9 +
 arch/arm/include/asm/prom.h |   37 ++
 arch/arm/include/asm/setup.h|4 +
 arch/arm/kernel/Makefile|1-
 arch/arm/kernel/devtree.c   |  145 +++
 arch/arm/kernel/head-common.S   |   24 +++-
 arch/arm/kernel/head.S  |8 +
 arch/arm/kernel/setup.c |   90 +-
 arch/arm/mm/init.c  |   11 ++
 12 files changed, 367 insertions(+), 50 deletions(-)
 create mode 100644 arch/arm/include/asm/prom.h
 create mode 100644 arch/arm/kernel/devtree.c

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


Re: [PATCH v6 0/5] Basic ARM devicetree support

2011-05-11 Thread Russell King - ARM Linux
On Wed, May 11, 2011 at 10:44:49PM +0200, Grant Likely wrote:
> Right now it merges cleanly with linux-next and the resulting tree
> builds and boots at least on qemu.  Unless you really object, I'm
> going to ask Stephen to add the following branch to the /end/ of the
> list of trees for linux-next so it can easily be dropped it if it
> causes any problems.

As far as the set of five patches looks fine to me, I don't have any
objections against them.  So I think we can merge them for .40.

What I've always worried about is the platform stuff, and that's
something I'm going to continue worrying about because I don't think
we have sufficient review capacity to ensure that we don't end up
with lots of stupidities.

Eg, we need to properly sort out how we're going to represent stuff
so we don't end up with X IRQ controllers, Y clock events, etc.  In
other words, I don't want to see DT growing an AT91 IRQ controller,
PXA IRQ controller, SA1100 IRQ controller, etc.

One of the things we must deal with is how do we reduce the amount
of IRQ controller code, clock event code, etc that we have in the
kernel tree.  That means coming up with some generic representation
of these facilities and having the right DT properties in place to
be able to describe to the generic representation what's required of
it.

If we can't do that, then DT isn't solving the problem which Linus
has complained about, and we will still be in the situation where
platform X wants its own IRQ controller, clock event, etc code.

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


How to remove –with-mode=thumb from linaro

2011-05-11 Thread AKS
Hi

I am using Linaro gcc on Ubuntu/ARM. I am having a problem in building
a package that does not support thumb nor thumb2. When I typed "gcc -v"
I saw that "–with-mode=thumb" and I assume that means my gcc compiler
will try to optimize some code in thumb. So I assume I need to make my
Linaro compiler knows that no thumb! Please correct me if I were wrong.

What flag I have to pass in making? I mean what to type in after CCFLAGS=
in make or what to be added in Makefile. Thanks!

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


Re: How to remove –with-mode=thumb from linaro

2011-05-11 Thread Ramana Radhakrishnan
On Thursday, 12 May 2011, AKS  wrote:

>
> What flag I have to pass in making? I mean what to type in after CCFLAGS=
> in make or what to be added in Makefile. Thanks!



Try using -marm.


Ramana
>
> ___
> 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


Re: Mainlining android fastboot support to upstream u-boot

2011-05-11 Thread Wolfgang Denk
Dear Zach,

In message  you wrote:
> 
> Would you be able to join us at UDS
> (https://wiki.linaro.org/Events/2011-05-LDS)? We can also set up a
> conference line as well.

As discussed, I'll try and attend remotely.

But Heiko Schocher, one of our engineers, will be there and attend
both the linaro-kernel-o-devicetree and
linaro-kernel-o-bootarchitecture sessions.

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
Everyting looks interesting until you do it. Then you find it's  just
another job. - Terry Pratchett, _Moving Pictures_

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