Re: [U-Boot] [PATCH] usb: ci_udc: fix warnings on 64-bit builds

2015-03-25 Thread Marek Vasut
On Tuesday, March 17, 2015 at 09:46:35 PM, Rob Herring wrote:
 Change addresses to unsigned long to be compatible with 64-bit builds.
 Regardless of fixing warnings, the device is still only 32-bit capable.
 
 Signed-off-by: Rob Herring r...@kernel.org
 Cc: Łukasz Majewski l.majew...@samsung.com
 Cc: Marek Vasut ma...@denx.de

Applied, thanks!

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] usb: ci_udc: fix warnings on 64-bit builds

2015-03-23 Thread Lukasz Majewski
Hi Rob,

 Change addresses to unsigned long to be compatible with 64-bit builds.
 Regardless of fixing warnings, the device is still only 32-bit
 capable.
 
 Signed-off-by: Rob Herring r...@kernel.org
 Cc: Łukasz Majewski l.majew...@samsung.com
 Cc: Marek Vasut ma...@denx.de
 ---
  drivers/usb/gadget/ci_udc.c | 42
 +- 1 file changed, 21
 insertions(+), 21 deletions(-)
 
 diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
 index b0ef35e..a231abf 100644
 --- a/drivers/usb/gadget/ci_udc.c
 +++ b/drivers/usb/gadget/ci_udc.c
 @@ -160,8 +160,8 @@ static struct ept_queue_item *ci_get_qtd(int
 ep_num, int dir_in) static void ci_flush_qh(int ep_num)
  {
   struct ept_queue_head *head = ci_get_qh(ep_num, 0);
 - const uint32_t start = (uint32_t)head;
 - const uint32_t end = start + 2 * sizeof(*head);
 + const unsigned long start = (unsigned long)head;
 + const unsigned long end = start + 2 * sizeof(*head);
  
   flush_dcache_range(start, end);
  }
 @@ -175,8 +175,8 @@ static void ci_flush_qh(int ep_num)
  static void ci_invalidate_qh(int ep_num)
  {
   struct ept_queue_head *head = ci_get_qh(ep_num, 0);
 - uint32_t start = (uint32_t)head;
 - uint32_t end = start + 2 * sizeof(*head);
 + unsigned long start = (unsigned long)head;
 + unsigned long end = start + 2 * sizeof(*head);
  
   invalidate_dcache_range(start, end);
  }
 @@ -190,8 +190,8 @@ static void ci_invalidate_qh(int ep_num)
  static void ci_flush_qtd(int ep_num)
  {
   struct ept_queue_item *item = ci_get_qtd(ep_num, 0);
 - const uint32_t start = (uint32_t)item;
 - const uint32_t end = start + 2 * ILIST_ENT_SZ;
 + const unsigned long start = (unsigned long)item;
 + const unsigned long end = start + 2 * ILIST_ENT_SZ;
  
   flush_dcache_range(start, end);
  }
 @@ -205,8 +205,8 @@ static void ci_flush_qtd(int ep_num)
  static void ci_invalidate_qtd(int ep_num)
  {
   struct ept_queue_item *item = ci_get_qtd(ep_num, 0);
 - const uint32_t start = (uint32_t)item;
 - const uint32_t end = start + 2 * ILIST_ENT_SZ;
 + const unsigned long start = (unsigned long)item;
 + const unsigned long end = start + 2 * ILIST_ENT_SZ;
  
   invalidate_dcache_range(start, end);
  }
 @@ -308,8 +308,8 @@ static int ci_ep_disable(struct usb_ep *ep)
  static int ci_bounce(struct ci_req *ci_req, int in)
  {
   struct usb_request *req = ci_req-req;
 - uint32_t addr = (uint32_t)req-buf;
 - uint32_t hwaddr;
 + unsigned long addr = (unsigned long)req-buf;
 + unsigned long hwaddr;
   uint32_t aligned_used_len;
  
   /* Input buffer address is not aligned. */
 @@ -343,7 +343,7 @@ align:
   memcpy(ci_req-hw_buf, req-buf, req-length);
  
  flush:
 - hwaddr = (uint32_t)ci_req-hw_buf;
 + hwaddr = (unsigned long)ci_req-hw_buf;
   aligned_used_len = roundup(req-length, ARCH_DMA_MINALIGN);
   flush_dcache_range(hwaddr, hwaddr + aligned_used_len);
  
 @@ -353,8 +353,8 @@ flush:
  static void ci_debounce(struct ci_req *ci_req, int in)
  {
   struct usb_request *req = ci_req-req;
 - uint32_t addr = (uint32_t)req-buf;
 - uint32_t hwaddr = (uint32_t)ci_req-hw_buf;
 + unsigned long addr = (unsigned long)req-buf;
 + unsigned long hwaddr = (unsigned long)ci_req-hw_buf;
   uint32_t aligned_used_len;
  
   if (in)
 @@ -388,13 +388,13 @@ static void ci_ep_submit_next_request(struct
 ci_ep *ci_ep) len = ci_req-req.length;
  
   item-info = INFO_BYTES(len) | INFO_ACTIVE;
 - item-page0 = (uint32_t)ci_req-hw_buf;
 - item-page1 = ((uint32_t)ci_req-hw_buf  0xf000) +
 0x1000;
 - item-page2 = ((uint32_t)ci_req-hw_buf  0xf000) +
 0x2000;
 - item-page3 = ((uint32_t)ci_req-hw_buf  0xf000) +
 0x3000;
 - item-page4 = ((uint32_t)ci_req-hw_buf  0xf000) +
 0x4000;
 + item-page0 = (unsigned long)ci_req-hw_buf;
 + item-page1 = ((unsigned long)ci_req-hw_buf  0xf000) +
 0x1000;
 + item-page2 = ((unsigned long)ci_req-hw_buf  0xf000) +
 0x2000;
 + item-page3 = ((unsigned long)ci_req-hw_buf  0xf000) +
 0x3000;
 + item-page4 = ((unsigned long)ci_req-hw_buf  0xf000) +
 0x4000; 
 - head-next = (unsigned) item;
 + head-next = (unsigned long)item;
   head-info = 0;
  
   /*
 @@ -422,7 +422,7 @@ static void ci_ep_submit_next_request(struct
 ci_ep *ci_ep)
* can use the other to transmit the extra
 zero-length packet. */
   struct ept_queue_item *other_item = ci_get_qtd(num,
 0);
 - item-next = (unsigned)other_item;
 + item-next = (unsigned long)other_item;
   item = other_item;
   item-info = INFO_ACTIVE;
   }
 @@ -772,7 +772,7 @@ static int ci_pullup(struct usb_gadget *gadget,
 int is_on) writel(USBCMD_ITC(MICRO_8FRAME) | USBCMD_RST,
 udc-usbcmd); udelay(200);
  
 - writel((unsigned)controller.epts, udc-epinitaddr);
 +

[U-Boot] [PATCH] usb: ci_udc: fix warnings on 64-bit builds

2015-03-17 Thread Rob Herring
Change addresses to unsigned long to be compatible with 64-bit builds.
Regardless of fixing warnings, the device is still only 32-bit capable.

Signed-off-by: Rob Herring r...@kernel.org
Cc: Łukasz Majewski l.majew...@samsung.com
Cc: Marek Vasut ma...@denx.de
---
 drivers/usb/gadget/ci_udc.c | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index b0ef35e..a231abf 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -160,8 +160,8 @@ static struct ept_queue_item *ci_get_qtd(int ep_num, int 
dir_in)
 static void ci_flush_qh(int ep_num)
 {
struct ept_queue_head *head = ci_get_qh(ep_num, 0);
-   const uint32_t start = (uint32_t)head;
-   const uint32_t end = start + 2 * sizeof(*head);
+   const unsigned long start = (unsigned long)head;
+   const unsigned long end = start + 2 * sizeof(*head);
 
flush_dcache_range(start, end);
 }
@@ -175,8 +175,8 @@ static void ci_flush_qh(int ep_num)
 static void ci_invalidate_qh(int ep_num)
 {
struct ept_queue_head *head = ci_get_qh(ep_num, 0);
-   uint32_t start = (uint32_t)head;
-   uint32_t end = start + 2 * sizeof(*head);
+   unsigned long start = (unsigned long)head;
+   unsigned long end = start + 2 * sizeof(*head);
 
invalidate_dcache_range(start, end);
 }
@@ -190,8 +190,8 @@ static void ci_invalidate_qh(int ep_num)
 static void ci_flush_qtd(int ep_num)
 {
struct ept_queue_item *item = ci_get_qtd(ep_num, 0);
-   const uint32_t start = (uint32_t)item;
-   const uint32_t end = start + 2 * ILIST_ENT_SZ;
+   const unsigned long start = (unsigned long)item;
+   const unsigned long end = start + 2 * ILIST_ENT_SZ;
 
flush_dcache_range(start, end);
 }
@@ -205,8 +205,8 @@ static void ci_flush_qtd(int ep_num)
 static void ci_invalidate_qtd(int ep_num)
 {
struct ept_queue_item *item = ci_get_qtd(ep_num, 0);
-   const uint32_t start = (uint32_t)item;
-   const uint32_t end = start + 2 * ILIST_ENT_SZ;
+   const unsigned long start = (unsigned long)item;
+   const unsigned long end = start + 2 * ILIST_ENT_SZ;
 
invalidate_dcache_range(start, end);
 }
@@ -308,8 +308,8 @@ static int ci_ep_disable(struct usb_ep *ep)
 static int ci_bounce(struct ci_req *ci_req, int in)
 {
struct usb_request *req = ci_req-req;
-   uint32_t addr = (uint32_t)req-buf;
-   uint32_t hwaddr;
+   unsigned long addr = (unsigned long)req-buf;
+   unsigned long hwaddr;
uint32_t aligned_used_len;
 
/* Input buffer address is not aligned. */
@@ -343,7 +343,7 @@ align:
memcpy(ci_req-hw_buf, req-buf, req-length);
 
 flush:
-   hwaddr = (uint32_t)ci_req-hw_buf;
+   hwaddr = (unsigned long)ci_req-hw_buf;
aligned_used_len = roundup(req-length, ARCH_DMA_MINALIGN);
flush_dcache_range(hwaddr, hwaddr + aligned_used_len);
 
@@ -353,8 +353,8 @@ flush:
 static void ci_debounce(struct ci_req *ci_req, int in)
 {
struct usb_request *req = ci_req-req;
-   uint32_t addr = (uint32_t)req-buf;
-   uint32_t hwaddr = (uint32_t)ci_req-hw_buf;
+   unsigned long addr = (unsigned long)req-buf;
+   unsigned long hwaddr = (unsigned long)ci_req-hw_buf;
uint32_t aligned_used_len;
 
if (in)
@@ -388,13 +388,13 @@ static void ci_ep_submit_next_request(struct ci_ep *ci_ep)
len = ci_req-req.length;
 
item-info = INFO_BYTES(len) | INFO_ACTIVE;
-   item-page0 = (uint32_t)ci_req-hw_buf;
-   item-page1 = ((uint32_t)ci_req-hw_buf  0xf000) + 0x1000;
-   item-page2 = ((uint32_t)ci_req-hw_buf  0xf000) + 0x2000;
-   item-page3 = ((uint32_t)ci_req-hw_buf  0xf000) + 0x3000;
-   item-page4 = ((uint32_t)ci_req-hw_buf  0xf000) + 0x4000;
+   item-page0 = (unsigned long)ci_req-hw_buf;
+   item-page1 = ((unsigned long)ci_req-hw_buf  0xf000) + 0x1000;
+   item-page2 = ((unsigned long)ci_req-hw_buf  0xf000) + 0x2000;
+   item-page3 = ((unsigned long)ci_req-hw_buf  0xf000) + 0x3000;
+   item-page4 = ((unsigned long)ci_req-hw_buf  0xf000) + 0x4000;
 
-   head-next = (unsigned) item;
+   head-next = (unsigned long)item;
head-info = 0;
 
/*
@@ -422,7 +422,7 @@ static void ci_ep_submit_next_request(struct ci_ep *ci_ep)
 * can use the other to transmit the extra zero-length packet.
 */
struct ept_queue_item *other_item = ci_get_qtd(num, 0);
-   item-next = (unsigned)other_item;
+   item-next = (unsigned long)other_item;
item = other_item;
item-info = INFO_ACTIVE;
}
@@ -772,7 +772,7 @@ static int ci_pullup(struct usb_gadget *gadget, int is_on)
writel(USBCMD_ITC(MICRO_8FRAME) | USBCMD_RST, udc-usbcmd);
udelay(200);
 
-