Commit dbd6fcfbe2331b953784ba972f66cb3df3e50ab2

Authored by Marek Vasut
1 parent 8e535af2e4

arm: socfpga: Drop the board boilerplate

Drop all the common board code, since it is not completely useless.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chin Liang See <clsee@altera.com>
Cc: Dinh Nguyen <dinguyen@opensource.altera.com>

Showing 7 changed files with 0 additions and 313 deletions Side-by-side Diff

board/altera/arria5-socdk/socfpga.c
... ... @@ -3,61 +3,5 @@
3 3 *
4 4 * SPDX-License-Identifier: GPL-2.0+
5 5 */
6   -
7 6 #include <common.h>
8   -#include <errno.h>
9   -#include <asm/arch/reset_manager.h>
10   -#include <asm/io.h>
11   -
12   -#include <usb.h>
13   -#include <usb/dwc2_udc.h>
14   -
15   -DECLARE_GLOBAL_DATA_PTR;
16   -
17   -void s_init(void) {}
18   -
19   -/*
20   - * Miscellaneous platform dependent initialisations
21   - */
22   -int board_init(void)
23   -{
24   - /* Address of boot parameters for ATAG (if ATAG is used) */
25   - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
26   -
27   - return 0;
28   -}
29   -
30   -#ifdef CONFIG_USB_GADGET
31   -struct dwc2_plat_otg_data socfpga_otg_data = {
32   - .usb_gusbcfg = 0x1417,
33   -};
34   -
35   -int board_usb_init(int index, enum usb_init_type init)
36   -{
37   - int node[2], count;
38   - fdt_addr_t addr;
39   -
40   - count = fdtdec_find_aliases_for_id(gd->fdt_blob, "udc",
41   - COMPAT_ALTERA_SOCFPGA_DWC2USB,
42   - node, 2);
43   - if (count <= 0) /* No controller found. */
44   - return 0;
45   -
46   - addr = fdtdec_get_addr(gd->fdt_blob, node[0], "reg");
47   - if (addr == FDT_ADDR_T_NONE) {
48   - printf("UDC Controller has no 'reg' property!\n");
49   - return -EINVAL;
50   - }
51   -
52   - /* Patch the address from OF into the controller pdata. */
53   - socfpga_otg_data.regs_otg = addr;
54   -
55   - return dwc2_udc_probe(&socfpga_otg_data);
56   -}
57   -
58   -int g_dnl_board_usb_cable_connected(void)
59   -{
60   - return 1;
61   -}
62   -#endif
board/altera/cyclone5-socdk/socfpga.c
... ... @@ -3,61 +3,5 @@
3 3 *
4 4 * SPDX-License-Identifier: GPL-2.0+
5 5 */
6   -
7 6 #include <common.h>
8   -#include <errno.h>
9   -#include <asm/arch/reset_manager.h>
10   -#include <asm/io.h>
11   -
12   -#include <usb.h>
13   -#include <usb/dwc2_udc.h>
14   -
15   -DECLARE_GLOBAL_DATA_PTR;
16   -
17   -void s_init(void) {}
18   -
19   -/*
20   - * Miscellaneous platform dependent initialisations
21   - */
22   -int board_init(void)
23   -{
24   - /* Address of boot parameters for ATAG (if ATAG is used) */
25   - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
26   -
27   - return 0;
28   -}
29   -
30   -#ifdef CONFIG_USB_GADGET
31   -struct dwc2_plat_otg_data socfpga_otg_data = {
32   - .usb_gusbcfg = 0x1417,
33   -};
34   -
35   -int board_usb_init(int index, enum usb_init_type init)
36   -{
37   - int node[2], count;
38   - fdt_addr_t addr;
39   -
40   - count = fdtdec_find_aliases_for_id(gd->fdt_blob, "udc",
41   - COMPAT_ALTERA_SOCFPGA_DWC2USB,
42   - node, 2);
43   - if (count <= 0) /* No controller found. */
44   - return 0;
45   -
46   - addr = fdtdec_get_addr(gd->fdt_blob, node[0], "reg");
47   - if (addr == FDT_ADDR_T_NONE) {
48   - printf("UDC Controller has no 'reg' property!\n");
49   - return -EINVAL;
50   - }
51   -
52   - /* Patch the address from OF into the controller pdata. */
53   - socfpga_otg_data.regs_otg = addr;
54   -
55   - return dwc2_udc_probe(&socfpga_otg_data);
56   -}
57   -
58   -int g_dnl_board_usb_cable_connected(void)
59   -{
60   - return 1;
61   -}
62   -#endif
board/denx/mcvevk/socfpga.c
... ... @@ -3,61 +3,5 @@
3 3 *
4 4 * SPDX-License-Identifier: GPL-2.0+
5 5 */
6   -
7 6 #include <common.h>
8   -#include <errno.h>
9   -#include <asm/arch/reset_manager.h>
10   -#include <asm/io.h>
11   -
12   -#include <usb.h>
13   -#include <usb/dwc2_udc.h>
14   -
15   -DECLARE_GLOBAL_DATA_PTR;
16   -
17   -void s_init(void) {}
18   -
19   -/*
20   - * Miscellaneous platform dependent initialisations
21   - */
22   -int board_init(void)
23   -{
24   - /* Address of boot parameters for ATAG (if ATAG is used) */
25   - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
26   -
27   - return 0;
28   -}
29   -
30   -#ifdef CONFIG_USB_GADGET
31   -struct dwc2_plat_otg_data socfpga_otg_data = {
32   - .usb_gusbcfg = 0x1417,
33   -};
34   -
35   -int board_usb_init(int index, enum usb_init_type init)
36   -{
37   - int node[2], count;
38   - fdt_addr_t addr;
39   -
40   - count = fdtdec_find_aliases_for_id(gd->fdt_blob, "udc",
41   - COMPAT_ALTERA_SOCFPGA_DWC2USB,
42   - node, 2);
43   - if (count <= 0) /* No controller found. */
44   - return 0;
45   -
46   - addr = fdtdec_get_addr(gd->fdt_blob, node[0], "reg");
47   - if (addr == FDT_ADDR_T_NONE) {
48   - printf("UDC Controller has no 'reg' property!\n");
49   - return -EINVAL;
50   - }
51   -
52   - /* Patch the address from OF into the controller pdata. */
53   - socfpga_otg_data.regs_otg = addr;
54   -
55   - return dwc2_udc_probe(&socfpga_otg_data);
56   -}
57   -
58   -int g_dnl_board_usb_cable_connected(void)
59   -{
60   - return 1;
61   -}
62   -#endif
board/ebv/socrates/socfpga.c
... ... @@ -3,61 +3,5 @@
3 3 *
4 4 * SPDX-License-Identifier: GPL-2.0+
5 5 */
6   -
7 6 #include <common.h>
8   -#include <errno.h>
9   -#include <asm/arch/reset_manager.h>
10   -#include <asm/io.h>
11   -
12   -#include <usb.h>
13   -#include <usb/dwc2_udc.h>
14   -
15   -DECLARE_GLOBAL_DATA_PTR;
16   -
17   -void s_init(void) {}
18   -
19   -/*
20   - * Miscellaneous platform dependent initialisations
21   - */
22   -int board_init(void)
23   -{
24   - /* Address of boot parameters for ATAG (if ATAG is used) */
25   - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
26   -
27   - return 0;
28   -}
29   -
30   -#ifdef CONFIG_USB_GADGET
31   -struct dwc2_plat_otg_data socfpga_otg_data = {
32   - .usb_gusbcfg = 0x1417,
33   -};
34   -
35   -int board_usb_init(int index, enum usb_init_type init)
36   -{
37   - int node[2], count;
38   - fdt_addr_t addr;
39   -
40   - count = fdtdec_find_aliases_for_id(gd->fdt_blob, "udc",
41   - COMPAT_ALTERA_SOCFPGA_DWC2USB,
42   - node, 2);
43   - if (count <= 0) /* No controller found. */
44   - return 0;
45   -
46   - addr = fdtdec_get_addr(gd->fdt_blob, node[0], "reg");
47   - if (addr == FDT_ADDR_T_NONE) {
48   - printf("UDC Controller has no 'reg' property!\n");
49   - return -EINVAL;
50   - }
51   -
52   - /* Patch the address from OF into the controller pdata. */
53   - socfpga_otg_data.regs_otg = addr;
54   -
55   - return dwc2_udc_probe(&socfpga_otg_data);
56   -}
57   -
58   -int g_dnl_board_usb_cable_connected(void)
59   -{
60   - return 1;
61   -}
62   -#endif
board/sr1500/socfpga.c
... ... @@ -5,26 +5,9 @@
5 5 */
6 6  
7 7 #include <common.h>
8   -#include <i2c.h>
9   -#include <miiphy.h>
10 8 #include <asm/arch/reset_manager.h>
11 9 #include <asm/gpio.h>
12 10 #include <asm/io.h>
13   -
14   -DECLARE_GLOBAL_DATA_PTR;
15   -
16   -void s_init(void) {}
17   -
18   -/*
19   - * Miscellaneous platform dependent initialisations
20   - */
21   -int board_init(void)
22   -{
23   - /* Address of boot parameters for ATAG (if ATAG is used) */
24   - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
25   -
26   - return 0;
27   -}
28 11  
29 12 int board_early_init_f(void)
30 13 {
board/terasic/de0-nano-soc/socfpga.c
... ... @@ -3,21 +3,5 @@
3 3 *
4 4 * SPDX-License-Identifier: GPL-2.0+
5 5 */
6   -
7 6 #include <common.h>
8   -
9   -DECLARE_GLOBAL_DATA_PTR;
10   -
11   -void s_init(void) {}
12   -
13   -/*
14   - * Miscellaneous platform dependent initialisations
15   - */
16   -int board_init(void)
17   -{
18   - /* Address of boot parameters for ATAG (if ATAG is used) */
19   - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
20   -
21   - return 0;
22   -}
board/terasic/sockit/socfpga.c
... ... @@ -3,61 +3,5 @@
3 3 *
4 4 * SPDX-License-Identifier: GPL-2.0+
5 5 */
6   -
7 6 #include <common.h>
8   -#include <errno.h>
9   -#include <asm/arch/reset_manager.h>
10   -#include <asm/io.h>
11   -
12   -#include <usb.h>
13   -#include <usb/dwc2_udc.h>
14   -
15   -DECLARE_GLOBAL_DATA_PTR;
16   -
17   -void s_init(void) {}
18   -
19   -/*
20   - * Miscellaneous platform dependent initialisations
21   - */
22   -int board_init(void)
23   -{
24   - /* Address of boot parameters for ATAG (if ATAG is used) */
25   - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
26   -
27   - return 0;
28   -}
29   -
30   -#ifdef CONFIG_USB_GADGET
31   -struct dwc2_plat_otg_data socfpga_otg_data = {
32   - .usb_gusbcfg = 0x1417,
33   -};
34   -
35   -int board_usb_init(int index, enum usb_init_type init)
36   -{
37   - int node[2], count;
38   - fdt_addr_t addr;
39   -
40   - count = fdtdec_find_aliases_for_id(gd->fdt_blob, "udc",
41   - COMPAT_ALTERA_SOCFPGA_DWC2USB,
42   - node, 2);
43   - if (count <= 0) /* No controller found. */
44   - return -EINVAL;
45   -
46   - addr = fdtdec_get_addr(gd->fdt_blob, node[0], "reg");
47   - if (addr == FDT_ADDR_T_NONE) {
48   - printf("UDC Controller has no 'reg' property!\n");
49   - return -EINVAL;
50   - }
51   -
52   - /* Patch the address from OF into the controller pdata. */
53   - socfpga_otg_data.regs_otg = addr;
54   -
55   - return dwc2_udc_probe(&socfpga_otg_data);
56   -}
57   -
58   -int g_dnl_board_usb_cable_connected(void)
59   -{
60   - return 1;
61   -}
62   -#endif