Commit 30caa4b763bf5973800633de55bae586ab443f78

Authored by Marc Kleine-Budde
1 parent 38ae92dc21

ARM: imx: prepare for removal of flexcan_platform_data

As there are no imx in-tree users of flexcan_platform_data, this patch removes
the possibility to register a flexcan device with platform data.

The functionality to swith on/off CAN transceivers is added to DT via
regulators in a later patch.

Compile time tested with imx_v4_v5_defconfig and imx_v6_v7_defconfig.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

Showing 8 changed files with 15 additions and 18 deletions Side-by-side Diff

arch/arm/mach-imx/devices-imx25.h
... ... @@ -13,10 +13,10 @@
13 13 imx_add_fec(&imx25_fec_data, pdata)
14 14  
15 15 extern const struct imx_flexcan_data imx25_flexcan_data[];
16   -#define imx25_add_flexcan(id, pdata) \
17   - imx_add_flexcan(&imx25_flexcan_data[id], pdata)
18   -#define imx25_add_flexcan0(pdata) imx25_add_flexcan(0, pdata)
19   -#define imx25_add_flexcan1(pdata) imx25_add_flexcan(1, pdata)
  16 +#define imx25_add_flexcan(id) \
  17 + imx_add_flexcan(&imx25_flexcan_data[id])
  18 +#define imx25_add_flexcan0() imx25_add_flexcan(0)
  19 +#define imx25_add_flexcan1() imx25_add_flexcan(1)
20 20  
21 21 extern const struct imx_fsl_usb2_udc_data imx25_fsl_usb2_udc_data;
22 22 #define imx25_add_fsl_usb2_udc(pdata) \
arch/arm/mach-imx/devices-imx35.h
... ... @@ -17,10 +17,10 @@
17 17 imx_add_fsl_usb2_udc(&imx35_fsl_usb2_udc_data, pdata)
18 18  
19 19 extern const struct imx_flexcan_data imx35_flexcan_data[];
20   -#define imx35_add_flexcan(id, pdata) \
21   - imx_add_flexcan(&imx35_flexcan_data[id], pdata)
22   -#define imx35_add_flexcan0(pdata) imx35_add_flexcan(0, pdata)
23   -#define imx35_add_flexcan1(pdata) imx35_add_flexcan(1, pdata)
  20 +#define imx35_add_flexcan(id) \
  21 + imx_add_flexcan(&imx35_flexcan_data[id])
  22 +#define imx35_add_flexcan0() imx35_add_flexcan(0)
  23 +#define imx35_add_flexcan1() imx35_add_flexcan(1)
24 24  
25 25 extern const struct imx_imx2_wdt_data imx35_imx2_wdt_data;
26 26 #define imx35_add_imx2_wdt() \
arch/arm/mach-imx/devices/devices-common.h
... ... @@ -50,7 +50,6 @@
50 50 const struct imx_fec_data *data,
51 51 const struct fec_platform_data *pdata);
52 52  
53   -#include <linux/can/platform/flexcan.h>
54 53 struct imx_flexcan_data {
55 54 int id;
56 55 resource_size_t iobase;
... ... @@ -58,8 +57,7 @@
58 57 resource_size_t irq;
59 58 };
60 59 struct platform_device *__init imx_add_flexcan(
61   - const struct imx_flexcan_data *data,
62   - const struct flexcan_platform_data *pdata);
  60 + const struct imx_flexcan_data *data);
63 61  
64 62 #include <linux/fsl_devices.h>
65 63 struct imx_fsl_usb2_udc_data {
arch/arm/mach-imx/devices/platform-flexcan.c
... ... @@ -38,8 +38,7 @@
38 38 #endif /* ifdef CONFIG_SOC_IMX35 */
39 39  
40 40 struct platform_device *__init imx_add_flexcan(
41   - const struct imx_flexcan_data *data,
42   - const struct flexcan_platform_data *pdata)
  41 + const struct imx_flexcan_data *data)
43 42 {
44 43 struct resource res[] = {
45 44 {
... ... @@ -54,6 +53,6 @@
54 53 };
55 54  
56 55 return imx_add_platform_device("flexcan", data->id,
57   - res, ARRAY_SIZE(res), pdata, sizeof(*pdata));
  56 + res, ARRAY_SIZE(res), NULL, 0);
58 57 }
arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c
... ... @@ -279,7 +279,7 @@
279 279 imx25_add_imx_fb(&eukrea_mximxsd_fb_pdata);
280 280 imx25_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);
281 281  
282   - imx25_add_flexcan1(NULL);
  282 + imx25_add_flexcan1();
283 283 imx25_add_sdhci_esdhc_imx(0, &sd1_pdata);
284 284  
285 285 gpio_request(GPIO_LED1, "LED1");
arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c
... ... @@ -287,7 +287,7 @@
287 287  
288 288 imx35_add_imx_ssi(0, &eukrea_mbimxsd_ssi_pdata);
289 289  
290   - imx35_add_flexcan1(NULL);
  290 + imx35_add_flexcan1();
291 291 imx35_add_sdhci_esdhc_imx(0, &sd1_pdata);
292 292  
293 293 gpio_request(GPIO_LED1, "LED1");
arch/arm/mach-imx/mach-mx25_3ds.c
... ... @@ -249,7 +249,7 @@
249 249 imx25_add_imx_i2c0(&mx25_3ds_i2c0_data);
250 250  
251 251 gpio_request_one(MX25PDK_CAN_PWDN, GPIOF_OUT_INIT_LOW, "can-pwdn");
252   - imx25_add_flexcan0(NULL);
  252 + imx25_add_flexcan0();
253 253 }
254 254  
255 255 static void __init mx25pdk_timer_init(void)
arch/arm/mach-imx/mach-pcm043.c
... ... @@ -385,7 +385,7 @@
385 385 if (!otg_mode_host)
386 386 imx35_add_fsl_usb2_udc(&otg_device_pdata);
387 387  
388   - imx35_add_flexcan1(NULL);
  388 + imx35_add_flexcan1();
389 389 imx35_add_sdhci_esdhc_imx(0, &sd1_pdata);
390 390 }
391 391