mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] fsl_udc: fix warning
@ 2010-10-20 13:40 Eric Bénard
  2010-10-20 13:40 ` [PATCH 2/3] cpuimx35: " Eric Bénard
  2010-10-20 13:40 ` [PATCH 3/3] i.MX25 & 35 usb config bits : create mach/usb.h Eric Bénard
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Bénard @ 2010-10-20 13:40 UTC (permalink / raw)
  To: barebox

this patch fix the following warning :
drivers/usb/gadget/fsl_udc.c: In function 'done':
drivers/usb/gadget/fsl_udc.c:566: warning: passing argument 1 of 'dma_inv_range' makes integer from pointer without a cast
arch/arm/include/asm/mmu.h:24: note: expected 'long unsigned int' but argument is of type 'void *'
drivers/usb/gadget/fsl_udc.c:566: warning: passing argument 2 of 'dma_inv_range' makes integer from pointer without a cast
arch/arm/include/asm/mmu.h:24: note: expected 'long unsigned int' but argument is of type 'void *'

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 drivers/usb/gadget/fsl_udc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/fsl_udc.c b/drivers/usb/gadget/fsl_udc.c
index 119afcb..48fd0b5 100644
--- a/drivers/usb/gadget/fsl_udc.c
+++ b/drivers/usb/gadget/fsl_udc.c
@@ -563,7 +563,8 @@ static void done(struct fsl_ep *ep, struct fsl_req *req, int status)
 		dma_free_coherent(curr_td);
 	}
 
-	dma_inv_range(req->req.buf, req->req.buf + req->req.length);
+	dma_inv_range((unsigned long)req->req.buf,
+		(unsigned long)(req->req.buf + req->req.length));
 
 	if (status && (status != -ESHUTDOWN))
 		VDBG("complete %s req %p stat %d len %u/%u",
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/3] cpuimx35: fix warning
  2010-10-20 13:40 [PATCH 1/3] fsl_udc: fix warning Eric Bénard
@ 2010-10-20 13:40 ` Eric Bénard
  2010-10-21 19:06   ` Sascha Hauer
  2010-10-20 13:40 ` [PATCH 3/3] i.MX25 & 35 usb config bits : create mach/usb.h Eric Bénard
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Bénard @ 2010-10-20 13:40 UTC (permalink / raw)
  To: barebox

this patch fix the following warning :
arch/arm/boards/eukrea_cpuimx35/flash_header.c:30: warning: "DEST_BASE" redefined
arch/arm/mach-imx/include/mach/imx-flash-header.h:29: note: this is the location of the previous definition

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/boards/eukrea_cpuimx35/flash_header.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx35/flash_header.c b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
index 4163caf..3133995 100644
--- a/arch/arm/boards/eukrea_cpuimx35/flash_header.c
+++ b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
@@ -27,6 +27,7 @@ struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
 	{ .ptr_type = 4, .addr = 0xb8001010, .val = 0x00000004, },
 };
 
+#undef DEST_BASE
 #define DEST_BASE 0x80000000
 struct imx_flash_header __flash_header_section flash_header = {
 	.app_code_jump_vector	= DEST_BASE + 0x1000,
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/3] i.MX25 & 35 usb config bits : create mach/usb.h
  2010-10-20 13:40 [PATCH 1/3] fsl_udc: fix warning Eric Bénard
  2010-10-20 13:40 ` [PATCH 2/3] cpuimx35: " Eric Bénard
@ 2010-10-20 13:40 ` Eric Bénard
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Bénard @ 2010-10-20 13:40 UTC (permalink / raw)
  To: barebox

as suggested by Baruch Siach

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c |   11 +----------
 arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c |   11 +----------
 arch/arm/mach-imx/include/mach/usb.h              |   14 ++++++++++++++
 3 files changed, 16 insertions(+), 20 deletions(-)
 create mode 100644 arch/arm/mach-imx/include/mach/usb.h

diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index c2eb398..805ffe2 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -42,6 +42,7 @@
 #include <mach/iomux-mx25.h>
 #include <i2c/i2c.h>
 #include <usb/fsl_usb2.h>
+#include <mach/usb.h>
 
 extern unsigned long _stext;
 extern void exception_vectors(void);
@@ -165,16 +166,6 @@ static struct device_d esdhc_dev = {
 };
 
 #ifdef CONFIG_USB
-
-#define MX35_H1_SIC_SHIFT	21
-#define MX35_H1_SIC_MASK	(0x3 << MX35_H1_SIC_SHIFT)
-#define MX35_H1_PM_BIT		(1 << 8)
-#define MX35_H1_IPPUE_UP_BIT	(1 << 7)
-#define MX35_H1_IPPUE_DOWN_BIT	(1 << 6)
-#define MX35_H1_TLL_BIT		(1 << 5)
-#define MX35_H1_USBTE_BIT	(1 << 4)
-#define MXC_EHCI_INTERFACE_SINGLE_UNI	(2 << 0)
-
 static void imx25_usb_init(void)
 {
 	unsigned int tmp;
diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index 7d85f97..dfe64d0 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -53,6 +53,7 @@
 #include <mach/imx-pll.h>
 #include <i2c/i2c.h>
 #include <usb/fsl_usb2.h>
+#include <mach/usb.h>
 
 static struct fec_platform_data fec_info = {
 	.xcv_type	= MII100,
@@ -140,16 +141,6 @@ static struct device_d esdhc_dev = {
 };
 
 #ifdef CONFIG_USB
-
-#define MX35_H1_SIC_SHIFT	21
-#define MX35_H1_SIC_MASK	(0x3 << MX35_H1_SIC_SHIFT)
-#define MX35_H1_PM_BIT		(1 << 8)
-#define MX35_H1_IPPUE_UP_BIT	(1 << 7)
-#define MX35_H1_IPPUE_DOWN_BIT	(1 << 6)
-#define MX35_H1_TLL_BIT		(1 << 5)
-#define MX35_H1_USBTE_BIT	(1 << 4)
-#define MXC_EHCI_INTERFACE_SINGLE_UNI	(2 << 0)
-
 static void imx35_usb_init(void)
 {
 	unsigned int tmp;
diff --git a/arch/arm/mach-imx/include/mach/usb.h b/arch/arm/mach-imx/include/mach/usb.h
new file mode 100644
index 0000000..5d6670d
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/usb.h
@@ -0,0 +1,14 @@
+#ifndef __MACH_USB_H_
+#define __MACH_USB_H_
+
+/* configuration bits for i.MX25 and i.MX35 */
+#define MX35_H1_SIC_SHIFT	21
+#define MX35_H1_SIC_MASK	(0x3 << MX35_H1_SIC_SHIFT)
+#define MX35_H1_PM_BIT		(1 << 8)
+#define MX35_H1_IPPUE_UP_BIT	(1 << 7)
+#define MX35_H1_IPPUE_DOWN_BIT	(1 << 6)
+#define MX35_H1_TLL_BIT		(1 << 5)
+#define MX35_H1_USBTE_BIT	(1 << 4)
+#define MXC_EHCI_INTERFACE_SINGLE_UNI	(2 << 0)
+
+#endif /* __MACH_USB_H_*/
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] cpuimx35: fix warning
  2010-10-20 13:40 ` [PATCH 2/3] cpuimx35: " Eric Bénard
@ 2010-10-21 19:06   ` Sascha Hauer
  2010-10-21 20:40     ` Eric Bénard
  2010-11-01 19:51     ` [PATCH] " Eric Bénard
  0 siblings, 2 replies; 6+ messages in thread
From: Sascha Hauer @ 2010-10-21 19:06 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

Hi Eric,

On Wed, Oct 20, 2010 at 03:40:16PM +0200, Eric Bénard wrote:
> this patch fix the following warning :
> arch/arm/boards/eukrea_cpuimx35/flash_header.c:30: warning: "DEST_BASE" redefined
> arch/arm/mach-imx/include/mach/imx-flash-header.h:29: note: this is the location of the previous definition
> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
>  arch/arm/boards/eukrea_cpuimx35/flash_header.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boards/eukrea_cpuimx35/flash_header.c b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
> index 4163caf..3133995 100644
> --- a/arch/arm/boards/eukrea_cpuimx35/flash_header.c
> +++ b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
> @@ -27,6 +27,7 @@ struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
>  	{ .ptr_type = 4, .addr = 0xb8001010, .val = 0x00000004, },
>  };
>  
> +#undef DEST_BASE
>  #define DEST_BASE 0x80000000
>  struct imx_flash_header __flash_header_section flash_header = {
>  	.app_code_jump_vector	= DEST_BASE + 0x1000,

Why don't you just use another define instead of redefining DEST_BASE?

Grepping through the other boards there seems to be something wrong
here. The original idea was to let the rom code copy the image to the
address it is linked at to not have to relocate it later. This seems to
be not the case for most boards

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] cpuimx35: fix warning
  2010-10-21 19:06   ` Sascha Hauer
@ 2010-10-21 20:40     ` Eric Bénard
  2010-11-01 19:51     ` [PATCH] " Eric Bénard
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Bénard @ 2010-10-21 20:40 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

Le 21/10/2010 21:06, Sascha Hauer a écrit :
>> +#undef DEST_BASE
>>   #define DEST_BASE 0x80000000
>>   struct imx_flash_header __flash_header_section flash_header = {
>>   	.app_code_jump_vector	= DEST_BASE + 0x1000,
>
> Why don't you just use another define instead of redefining DEST_BASE?
>
because I fixed this with my fingers and not with my brain :-D

Eric

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] cpuimx35: fix warning
  2010-10-21 19:06   ` Sascha Hauer
  2010-10-21 20:40     ` Eric Bénard
@ 2010-11-01 19:51     ` Eric Bénard
  1 sibling, 0 replies; 6+ messages in thread
From: Eric Bénard @ 2010-11-01 19:51 UTC (permalink / raw)
  To: s.hauer; +Cc: barebox

this patch fix the following warning :
arch/arm/boards/eukrea_cpuimx35/flash_header.c:30: warning: "DEST_BASE" redefined
arch/arm/mach-imx/include/mach/imx-flash-header.h:29: note: this is the location of the previous definition

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/boards/eukrea_cpuimx35/flash_header.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx35/flash_header.c b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
index 4163caf..5a77c3a 100644
--- a/arch/arm/boards/eukrea_cpuimx35/flash_header.c
+++ b/arch/arm/boards/eukrea_cpuimx35/flash_header.c
@@ -27,15 +27,15 @@ struct imx_dcd_entry __dcd_entry_section dcd_entry[] = {
 	{ .ptr_type = 4, .addr = 0xb8001010, .val = 0x00000004, },
 };
 
-#define DEST_BASE 0x80000000
+#define CPUIMX35_DEST_BASE 0x80000000
 struct imx_flash_header __flash_header_section flash_header = {
-	.app_code_jump_vector	= DEST_BASE + 0x1000,
+	.app_code_jump_vector	= CPUIMX35_DEST_BASE + 0x1000,
 	.app_code_barker	= APP_CODE_BARKER,
 	.app_code_csf		= 0,
 	.dcd_ptr_ptr		= FLASH_HEADER_BASE + offsetof(struct imx_flash_header, dcd),
 	.super_root_key		= 0,
 	.dcd			= FLASH_HEADER_BASE + offsetof(struct imx_flash_header, dcd_barker),
-	.app_dest		= DEST_BASE,
+	.app_dest		= CPUIMX35_DEST_BASE,
 	.dcd_barker		= DCD_BARKER,
 	.dcd_block_len		= sizeof(dcd_entry),
 };
-- 
1.7.0.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-01 19:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-20 13:40 [PATCH 1/3] fsl_udc: fix warning Eric Bénard
2010-10-20 13:40 ` [PATCH 2/3] cpuimx35: " Eric Bénard
2010-10-21 19:06   ` Sascha Hauer
2010-10-21 20:40     ` Eric Bénard
2010-11-01 19:51     ` [PATCH] " Eric Bénard
2010-10-20 13:40 ` [PATCH 3/3] i.MX25 & 35 usb config bits : create mach/usb.h Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox