at91: fix smartweb board support
Subsystems (3)
v2 cover at91: fix smartweb board support
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(-)
Signature · 1 line
2.7.4
PATCH v2 1/2 drivers, usb, gadget: fix compiler warnings for at91_udc.c
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]
---
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(-)
drivers/usb/gadget/at91_udc.c +1 -71
@@ -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;
Signature · 1 line
2.7.4
PATCH v2 1/2 drivers, usb, gadget: fix compiler warnings for at91_udc.c
Quoted 6 lines · Heiko Schocher
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 <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>
PATCH v2 2/2 atmel, at91: fix smartweb board
In reply to Heiko Schochersince commit: f8b7fff1d5c5 "serial: atmel_usart: Add clk support"
smartweb board comes not up anymore. Fix it.
---
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(-)
arch/arm/dts/at91sam9260-smartweb.dts +2 -0
@@ -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"; };
board/siemens/smartweb/smartweb.c +0 -9
@@ -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, -};
configs/smartweb_defconfig +3 -0
@@ -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
include/configs/smartweb.h +3 -0
@@ -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,
Signature · 1 line
2.7.4
Yang
PATCH v2 2/2 atmel, at91: fix smartweb board
Quoted 5 lines · Heiko Schocher
since commit:
f8b7fff1d5c5"serial:atmel_usart: Add clk support"smartweb board comes not up anymore. Fix it.
Signed-off-by Heiko Schocher <[email protected]>
Quoted 73 lines
---
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(-)arch/arm/dts/at91sam9260-smartweb.dts +2
-0@@ -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"; };board/siemens/smartweb/smartweb.c +0
-9@@ -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, -};configs/smartweb_defconfig +3
-0@@ -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=yinclude/configs/smartweb.h +0
-0
include/configs/smartweb.h line 219
Quoted 9 lines
include/configs/smartweb.h +3
-0@@ -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
PATCH v2 2/2 atmel, at91: fix smartweb board
In reply to Heiko SchocherQuoted 6 lines · Heiko Schocher
since commit:
f8b7fff1d5c5"serial:atmel_usart: Add clk support"smartweb board comes not up anymore. Fix it.
Signed-off-by Heiko Schocher <[email protected]>Acked-by Wenyou Yang <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>