brcm63xx: rename target to bcm63xx
[openwrt/staging/wigyori.git] / target / linux / bcm63xx / patches-4.14 / 390-MIPS-BCM63XX-do-not-register-SPI-controllers.patch
1 From 39d2882058345b5994680b8731848a0343878019 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jonas.gorski@gmail.com>
3 Date: Sat, 4 Feb 2017 12:58:50 +0100
4 Subject: [PATCH 7/8] MIPS: BCM63XX: do not register SPI controllers
5
6 We now register them through DT, so no need to keep them here.
7
8 Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
9 ---
10 arch/mips/bcm63xx/boards/board_bcm963xx.c | 7 -------
11 1 file changed, 7 deletions(-)
12
13 --- a/arch/mips/bcm63xx/boards/board_common.c
14 +++ b/arch/mips/bcm63xx/boards/board_common.c
15 @@ -27,9 +27,7 @@
16 #include <bcm63xx_dev_pci.h>
17 #include <bcm63xx_dev_enet.h>
18 #include <bcm63xx_dev_flash.h>
19 -#include <bcm63xx_dev_hsspi.h>
20 #include <bcm63xx_dev_pcmcia.h>
21 -#include <bcm63xx_dev_spi.h>
22 #include <bcm63xx_dev_usb_ehci.h>
23 #include <bcm63xx_dev_usb_ohci.h>
24 #include <bcm63xx_dev_usb_usbd.h>
25 @@ -236,10 +234,6 @@ int __init board_register_devices(void)
26 bcm63xx_register_fallback_sprom(&board.fallback_sprom)))
27 pr_err(PFX "failed to register fallback SPROM\n");
28
29 - bcm63xx_spi_register();
30 -
31 - bcm63xx_hsspi_register();
32 -
33 bcm63xx_flash_register();
34
35 bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
36 --- a/arch/mips/bcm63xx/Makefile
37 +++ b/arch/mips/bcm63xx/Makefile
38 @@ -1,7 +1,7 @@
39 # SPDX-License-Identifier: GPL-2.0
40 obj-y += clk.o cpu.o cs.o gpio.o irq.o nvram.o prom.o reset.o \
41 setup.o timer.o dev-enet.o dev-flash.o dev-pcmcia.o \
42 - dev-rng.o dev-spi.o dev-hsspi.o dev-uart.o dev-wdt.o \
43 + dev-rng.o dev-uart.o dev-wdt.o \
44 dev-usb-ehci.o dev-usb-ohci.o dev-usb-usbd.o usb-common.o \
45 sprom.o
46 obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
47 --- a/arch/mips/bcm63xx/dev-hsspi.c
48 +++ /dev/null
49 @@ -1,48 +0,0 @@
50 -/*
51 - * This file is subject to the terms and conditions of the GNU General Public
52 - * License. See the file "COPYING" in the main directory of this archive
53 - * for more details.
54 - *
55 - * Copyright (C) 2012 Jonas Gorski <jonas.gorski@gmail.com>
56 - */
57 -
58 -#include <linux/init.h>
59 -#include <linux/kernel.h>
60 -#include <linux/platform_device.h>
61 -
62 -#include <bcm63xx_cpu.h>
63 -#include <bcm63xx_dev_hsspi.h>
64 -#include <bcm63xx_regs.h>
65 -
66 -static struct resource spi_resources[] = {
67 - {
68 - .start = -1, /* filled at runtime */
69 - .end = -1, /* filled at runtime */
70 - .flags = IORESOURCE_MEM,
71 - },
72 - {
73 - .start = -1, /* filled at runtime */
74 - .flags = IORESOURCE_IRQ,
75 - },
76 -};
77 -
78 -static struct platform_device bcm63xx_hsspi_device = {
79 - .name = "bcm63xx-hsspi",
80 - .id = 0,
81 - .num_resources = ARRAY_SIZE(spi_resources),
82 - .resource = spi_resources,
83 -};
84 -
85 -int __init bcm63xx_hsspi_register(void)
86 -{
87 - if (!BCMCPU_IS_6318() && !BCMCPU_IS_6328() && !BCMCPU_IS_6362() &&
88 - !BCMCPU_IS_63268())
89 - return -ENODEV;
90 -
91 - spi_resources[0].start = bcm63xx_regset_address(RSET_HSSPI);
92 - spi_resources[0].end = spi_resources[0].start;
93 - spi_resources[0].end += RSET_HSSPI_SIZE - 1;
94 - spi_resources[1].start = bcm63xx_get_irq_number(IRQ_HSSPI);
95 -
96 - return platform_device_register(&bcm63xx_hsspi_device);
97 -}
98 --- a/arch/mips/bcm63xx/dev-spi.c
99 +++ /dev/null
100 @@ -1,60 +0,0 @@
101 -/*
102 - * This file is subject to the terms and conditions of the GNU General Public
103 - * License. See the file "COPYING" in the main directory of this archive
104 - * for more details.
105 - *
106 - * Copyright (C) 2009-2011 Florian Fainelli <florian@openwrt.org>
107 - * Copyright (C) 2010 Tanguy Bouzeloc <tanguy.bouzeloc@efixo.com>
108 - */
109 -
110 -#include <linux/init.h>
111 -#include <linux/kernel.h>
112 -#include <linux/export.h>
113 -#include <linux/platform_device.h>
114 -#include <linux/err.h>
115 -#include <linux/clk.h>
116 -
117 -#include <bcm63xx_cpu.h>
118 -#include <bcm63xx_dev_spi.h>
119 -#include <bcm63xx_regs.h>
120 -
121 -static struct resource spi_resources[] = {
122 - {
123 - .start = -1, /* filled at runtime */
124 - .end = -1, /* filled at runtime */
125 - .flags = IORESOURCE_MEM,
126 - },
127 - {
128 - .start = -1, /* filled at runtime */
129 - .flags = IORESOURCE_IRQ,
130 - },
131 -};
132 -
133 -static struct platform_device bcm63xx_spi_device = {
134 - .id = -1,
135 - .num_resources = ARRAY_SIZE(spi_resources),
136 - .resource = spi_resources,
137 -};
138 -
139 -int __init bcm63xx_spi_register(void)
140 -{
141 - if (BCMCPU_IS_6318() || BCMCPU_IS_6328() || BCMCPU_IS_6345())
142 - return -ENODEV;
143 -
144 - spi_resources[0].start = bcm63xx_regset_address(RSET_SPI);
145 - spi_resources[0].end = spi_resources[0].start;
146 - spi_resources[1].start = bcm63xx_get_irq_number(IRQ_SPI);
147 -
148 - if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) {
149 - bcm63xx_spi_device.name = "bcm6348-spi",
150 - spi_resources[0].end += BCM_6348_RSET_SPI_SIZE - 1;
151 - }
152 -
153 - if (BCMCPU_IS_3368() || BCMCPU_IS_6358() || BCMCPU_IS_6362() ||
154 - BCMCPU_IS_6368() || BCMCPU_IS_63268()) {
155 - bcm63xx_spi_device.name = "bcm6358-spi",
156 - spi_resources[0].end += BCM_6358_RSET_SPI_SIZE - 1;
157 - }
158 -
159 - return platform_device_register(&bcm63xx_spi_device);
160 -}
161 --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_hsspi.h
162 +++ /dev/null
163 @@ -1,9 +0,0 @@
164 -/* SPDX-License-Identifier: GPL-2.0 */
165 -#ifndef BCM63XX_DEV_HSSPI_H
166 -#define BCM63XX_DEV_HSSPI_H
167 -
168 -#include <linux/types.h>
169 -
170 -int bcm63xx_hsspi_register(void);
171 -
172 -#endif /* BCM63XX_DEV_HSSPI_H */