All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/2] at91: fix smartweb board support
@ 2017-06-23 18:13 Heiko Schocher
  2017-06-23 18:13 ` [U-Boot] [PATCH v2 1/2] drivers, usb, gadget: fix compiler warnings for at91_udc.c Heiko Schocher
  2017-06-23 18:13 ` [U-Boot] [PATCH v2 2/2] atmel, at91: fix smartweb board Heiko Schocher
  0 siblings, 2 replies; 6+ messages in thread
From: Heiko Schocher @ 2017-06-23 18:13 UTC (permalink / raw)
  To: u-boot


since commit: f8b7fff1d5c5 "serial: atmel_usart: Add clk support"
smartweb board comes not up anymore. Fix it.

While at it, fix compiler warning for drivers/usb/gadget/at91_udc.c

Patchset comiles clean on travis.

Changes in v2:
- add comment from Lukasz Majewski and Tom Rini
  delete not used functions

Heiko Schocher (2):
  drivers, usb, gadget: fix compiler warnings for at91_udc.c
  atmel, at91: fix smartweb board

 arch/arm/dts/at91sam9260-smartweb.dts |  2 +
 board/siemens/smartweb/smartweb.c     |  9 -----
 configs/smartweb_defconfig            |  3 ++
 drivers/usb/gadget/at91_udc.c         | 72 +----------------------------------
 include/configs/smartweb.h            |  3 ++
 5 files changed, 9 insertions(+), 80 deletions(-)

-- 
2.7.4

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

* [U-Boot] [PATCH v2 1/2] drivers, usb, gadget: fix compiler warnings for at91_udc.c
  2017-06-23 18:13 [U-Boot] [PATCH v2 0/2] at91: fix smartweb board support Heiko Schocher
@ 2017-06-23 18:13 ` Heiko Schocher
  2017-06-29 17:28   ` [U-Boot] [U-Boot, v2, " Tom Rini
  2017-06-23 18:13 ` [U-Boot] [PATCH v2 2/2] atmel, at91: fix smartweb board Heiko Schocher
  1 sibling, 1 reply; 6+ messages in thread
From: Heiko Schocher @ 2017-06-23 18:13 UTC (permalink / raw)
  To: u-boot

fix warnings:
drivers/usb/gadget/at91_udc.c:1344:12: warning: 'at91rm9200_udc_init' defined but not used [-Wunused-function]
drivers/usb/gadget/at91_udc.c:1379:13: warning: 'at91rm9200_udc_pullup' defined but not used [-Wunused-function]
drivers/usb/gadget/at91_udc.c:1476:12: warning: 'at91sam9263_udc_init' defined but not used [-Wunused-function]

Signed-off-by: Heiko Schocher <hs@denx.de>
---

Changes in v2:
- add comment from Lukasz Majewski and Tom Rini
  delete not used functions

 drivers/usb/gadget/at91_udc.c | 72 +------------------------------------------
 1 file changed, 1 insertion(+), 71 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 01a5907..9df6d32 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1341,51 +1341,7 @@ static int at91_stop(struct usb_gadget *gadget)
 
 /*-------------------------------------------------------------------------*/
 
-static int at91rm9200_udc_init(struct at91_udc *udc)
-{
-	struct at91_ep *ep;
-	int ret;
-	int i;
-
-	for (i = 0; i < NUM_ENDPOINTS; i++) {
-		ep = &udc->ep[i];
-
-		switch (i) {
-		case 0:
-		case 3:
-			ep->maxpacket = 8;
-			break;
-		case 1 ... 2:
-			ep->maxpacket = 64;
-			break;
-		case 4 ... 5:
-			ep->maxpacket = 256;
-			break;
-		}
-	}
-
-	ret = gpio_request(udc->board.pullup_pin, "udc_pullup");
-	if (ret) {
-		DBG("D+ pullup is busy\n");
-		return ret;
-	}
-
-	gpio_direction_output(udc->board.pullup_pin,
-			      udc->board.pullup_active_low);
-
-	return 0;
-}
-
-static void at91rm9200_udc_pullup(struct at91_udc *udc, int is_on)
-{
-	int active = !udc->board.pullup_active_low;
-
-	if (is_on)
-		gpio_set_value(udc->board.pullup_pin, active);
-	else
-		gpio_set_value(udc->board.pullup_pin, !active);
-}
-
+#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
 static int at91sam9260_udc_init(struct at91_udc *udc)
 {
 	struct at91_ep *ep;
@@ -1407,7 +1363,6 @@ static int at91sam9260_udc_init(struct at91_udc *udc)
 	return 0;
 }
 
-#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9G20)
 static void at91sam9260_udc_pullup(struct at91_udc *udc, int is_on)
 {
 	u32 txvc = at91_udp_read(udc, AT91_UDP_TXVC);
@@ -1473,31 +1428,6 @@ static const struct at91_udc_caps at91sam9261_udc_caps = {
 };
 #endif
 
-static int at91sam9263_udc_init(struct at91_udc *udc)
-{
-	struct at91_ep *ep;
-	int i;
-
-	for (i = 0; i < NUM_ENDPOINTS; i++) {
-		ep = &udc->ep[i];
-
-		switch (i) {
-		case 0:
-		case 1:
-		case 2:
-		case 3:
-			ep->maxpacket = 64;
-			break;
-		case 4:
-		case 5:
-			ep->maxpacket = 256;
-			break;
-		}
-	}
-
-	return 0;
-}
-
 int usb_gadget_handle_interrupts(int index)
 {
 	struct at91_udc *udc = controller;
-- 
2.7.4

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

* [U-Boot] [PATCH v2 2/2] atmel, at91: fix smartweb board
  2017-06-23 18:13 [U-Boot] [PATCH v2 0/2] at91: fix smartweb board support Heiko Schocher
  2017-06-23 18:13 ` [U-Boot] [PATCH v2 1/2] drivers, usb, gadget: fix compiler warnings for at91_udc.c Heiko Schocher
@ 2017-06-23 18:13 ` Heiko Schocher
  2017-06-26  0:46   ` Yang, Wenyou
  2017-06-29 17:28   ` [U-Boot] [U-Boot,v2,2/2] " Tom Rini
  1 sibling, 2 replies; 6+ messages in thread
From: Heiko Schocher @ 2017-06-23 18:13 UTC (permalink / raw)
  To: u-boot

since commit: f8b7fff1d5c5 "serial: atmel_usart: Add clk support"

smartweb board comes not up anymore. Fix it.

Signed-off-by: Heiko Schocher <hs@denx.de>
---

Changes in v2: None

 arch/arm/dts/at91sam9260-smartweb.dts | 2 ++
 board/siemens/smartweb/smartweb.c     | 9 ---------
 configs/smartweb_defconfig            | 3 +++
 include/configs/smartweb.h            | 3 +++
 4 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/arm/dts/at91sam9260-smartweb.dts b/arch/arm/dts/at91sam9260-smartweb.dts
index faed763..e59781b 100644
--- a/arch/arm/dts/at91sam9260-smartweb.dts
+++ b/arch/arm/dts/at91sam9260-smartweb.dts
@@ -18,6 +18,7 @@
 	compatible = "atmel,at91sam9260", "atmel,at91sam9";
 
 	chosen {
+		u-boot,dm-pre-reloc;
 		stdout-path = &dbgu;
 	};
 
@@ -48,6 +49,7 @@
 			};
 
 			dbgu: serial at fffff200 {
+				u-boot,dm-pre-reloc;
 				status = "okay";
 			};
 
diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c
index 78a7946..718ccc7 100644
--- a/board/siemens/smartweb/smartweb.c
+++ b/board/siemens/smartweb/smartweb.c
@@ -256,12 +256,3 @@ void mem_init(void)
 	sdramc_initialize(ATMEL_BASE_CS1, &setting);
 }
 #endif
-
-static struct atmel_serial_platdata at91sam9260_serial_plat = {
-	.base_addr = ATMEL_BASE_DBGU,
-};
-
-U_BOOT_DEVICE(at91sam9260_serial) = {
-	.name	= "serial_atmel",
-	.platdata = &at91sam9260_serial_plat,
-};
diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
index 48c8781..a769fc5 100644
--- a/configs/smartweb_defconfig
+++ b/configs/smartweb_defconfig
@@ -7,6 +7,7 @@ CONFIG_TARGET_SMARTWEB=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="at91sam9260-smartweb"
 CONFIG_FIT=y
@@ -33,6 +34,8 @@ CONFIG_CMD_FAT=y
 # CONFIG_DOS_PARTITION is not set
 CONFIG_OF_CONTROL=y
 CONFIG_OF_EMBED=y
+CONFIG_CLK=y
+CONFIG_CLK_AT91=y
 CONFIG_DFU_NAND=y
 # CONFIG_MMC is not set
 CONFIG_USB=y
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index 1236da7..8400278 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -211,6 +211,9 @@
 #define CONFIG_SYS_INIT_SP_ADDR		0x301000
 #define CONFIG_SPL_STACK_R
 #define CONFIG_SPL_STACK_R_ADDR		CONFIG_SYS_TEXT_BASE
+/* we have only 4k sram in SPL, so cut SYS_MALLOC_F_LEN */
+#undef CONFIG_SYS_MALLOC_F_LEN
+#define CONFIG_SYS_MALLOC_F_LEN 0x400
 #else
 /*
  * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM,
-- 
2.7.4

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

* [U-Boot] [PATCH v2 2/2] atmel, at91: fix smartweb board
  2017-06-23 18:13 ` [U-Boot] [PATCH v2 2/2] atmel, at91: fix smartweb board Heiko Schocher
@ 2017-06-26  0:46   ` Yang, Wenyou
  2017-06-29 17:28   ` [U-Boot] [U-Boot,v2,2/2] " Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Yang, Wenyou @ 2017-06-26  0:46 UTC (permalink / raw)
  To: u-boot



On 2017/6/24 2:13, Heiko Schocher wrote:
> since commit: f8b7fff1d5c5 "serial: atmel_usart: Add clk support"
>
> smartweb board comes not up anymore. Fix it.
>
> Signed-off-by: Heiko Schocher <hs@denx.de>

Acked-by: Wenyou Yang <wenyou.yang@microchip.com>
> ---
>
> Changes in v2: None
>
>   arch/arm/dts/at91sam9260-smartweb.dts | 2 ++
>   board/siemens/smartweb/smartweb.c     | 9 ---------
>   configs/smartweb_defconfig            | 3 +++
>   include/configs/smartweb.h            | 3 +++
>   4 files changed, 8 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/dts/at91sam9260-smartweb.dts b/arch/arm/dts/at91sam9260-smartweb.dts
> index faed763..e59781b 100644
> --- a/arch/arm/dts/at91sam9260-smartweb.dts
> +++ b/arch/arm/dts/at91sam9260-smartweb.dts
> @@ -18,6 +18,7 @@
>   	compatible = "atmel,at91sam9260", "atmel,at91sam9";
>   
>   	chosen {
> +		u-boot,dm-pre-reloc;
>   		stdout-path = &dbgu;
>   	};
>   
> @@ -48,6 +49,7 @@
>   			};
>   
>   			dbgu: serial at fffff200 {
> +				u-boot,dm-pre-reloc;
>   				status = "okay";
>   			};
>   
> diff --git a/board/siemens/smartweb/smartweb.c b/board/siemens/smartweb/smartweb.c
> index 78a7946..718ccc7 100644
> --- a/board/siemens/smartweb/smartweb.c
> +++ b/board/siemens/smartweb/smartweb.c
> @@ -256,12 +256,3 @@ void mem_init(void)
>   	sdramc_initialize(ATMEL_BASE_CS1, &setting);
>   }
>   #endif
> -
> -static struct atmel_serial_platdata at91sam9260_serial_plat = {
> -	.base_addr = ATMEL_BASE_DBGU,
> -};
> -
> -U_BOOT_DEVICE(at91sam9260_serial) = {
> -	.name	= "serial_atmel",
> -	.platdata = &at91sam9260_serial_plat,
> -};
> diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig
> index 48c8781..a769fc5 100644
> --- a/configs/smartweb_defconfig
> +++ b/configs/smartweb_defconfig
> @@ -7,6 +7,7 @@ CONFIG_TARGET_SMARTWEB=y
>   CONFIG_SPL_GPIO_SUPPORT=y
>   CONFIG_SPL_LIBCOMMON_SUPPORT=y
>   CONFIG_SPL_LIBGENERIC_SUPPORT=y
> +CONFIG_SYS_MALLOC_F_LEN=0x2000
>   CONFIG_SPL_NAND_SUPPORT=y
>   CONFIG_DEFAULT_DEVICE_TREE="at91sam9260-smartweb"
>   CONFIG_FIT=y
> @@ -33,6 +34,8 @@ CONFIG_CMD_FAT=y
>   # CONFIG_DOS_PARTITION is not set
>   CONFIG_OF_CONTROL=y
>   CONFIG_OF_EMBED=y
> +CONFIG_CLK=y
> +CONFIG_CLK_AT91=y
>   CONFIG_DFU_NAND=y
>   # CONFIG_MMC is not set
>   CONFIG_USB=y
> diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
> index 1236da7..8400278 100644
> --- a/include/configs/smartweb.h
> +++ b/include/configs/smartweb.h
> @@ -211,6 +211,9 @@
>   #define CONFIG_SYS_INIT_SP_ADDR		0x301000
>   #define CONFIG_SPL_STACK_R
>   #define CONFIG_SPL_STACK_R_ADDR		CONFIG_SYS_TEXT_BASE
> +/* we have only 4k sram in SPL, so cut SYS_MALLOC_F_LEN */
> +#undef CONFIG_SYS_MALLOC_F_LEN
> +#define CONFIG_SYS_MALLOC_F_LEN 0x400
>   #else
>   /*
>    * Initial stack pointer: 4k - GENERATED_GBL_DATA_SIZE in internal SRAM,

Best Regards,
Wenyou Yang

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

* [U-Boot] [U-Boot, v2, 1/2] drivers, usb, gadget: fix compiler warnings for at91_udc.c
  2017-06-23 18:13 ` [U-Boot] [PATCH v2 1/2] drivers, usb, gadget: fix compiler warnings for at91_udc.c Heiko Schocher
@ 2017-06-29 17:28   ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-06-29 17:28 UTC (permalink / raw)
  To: u-boot

On Fri, Jun 23, 2017 at 08:13:58PM +0200, Heiko Schocher wrote:

> fix warnings:
> drivers/usb/gadget/at91_udc.c:1344:12: warning: 'at91rm9200_udc_init' defined but not used [-Wunused-function]
> drivers/usb/gadget/at91_udc.c:1379:13: warning: 'at91rm9200_udc_pullup' defined but not used [-Wunused-function]
> drivers/usb/gadget/at91_udc.c:1476:12: warning: 'at91sam9263_udc_init' defined but not used [-Wunused-function]
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170629/ee413f4b/attachment.sig>

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

* [U-Boot] [U-Boot,v2,2/2] atmel, at91: fix smartweb board
  2017-06-23 18:13 ` [U-Boot] [PATCH v2 2/2] atmel, at91: fix smartweb board Heiko Schocher
  2017-06-26  0:46   ` Yang, Wenyou
@ 2017-06-29 17:28   ` Tom Rini
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2017-06-29 17:28 UTC (permalink / raw)
  To: u-boot

On Fri, Jun 23, 2017 at 08:13:59PM +0200, Heiko Schocher wrote:

> since commit: f8b7fff1d5c5 "serial: atmel_usart: Add clk support"
> 
> smartweb board comes not up anymore. Fix it.
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>
> Acked-by: Wenyou Yang <wenyou.yang@microchip.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170629/92f35c51/attachment.sig>

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

end of thread, other threads:[~2017-06-29 17:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 18:13 [U-Boot] [PATCH v2 0/2] at91: fix smartweb board support Heiko Schocher
2017-06-23 18:13 ` [U-Boot] [PATCH v2 1/2] drivers, usb, gadget: fix compiler warnings for at91_udc.c Heiko Schocher
2017-06-29 17:28   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-06-23 18:13 ` [U-Boot] [PATCH v2 2/2] atmel, at91: fix smartweb board Heiko Schocher
2017-06-26  0:46   ` Yang, Wenyou
2017-06-29 17:28   ` [U-Boot] [U-Boot,v2,2/2] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.