forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/arm/mach-omap1/devices.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * linux/arch/arm/mach-omap1/devices.c
34 *
45 * OMAP1 platform device setup/initialization
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
106 */
117
128 #include <linux/dma-mapping.h>
....@@ -25,7 +21,6 @@
2521 #include <mach/mux.h>
2622
2723 #include <mach/omap7xx.h>
28
-#include "camera.h"
2924 #include <mach/hardware.h>
3025
3126 #include "common.h"
....@@ -244,6 +239,9 @@
244239
245240 static void omap_init_spi100k(void)
246241 {
242
+ if (!cpu_is_omap7xx())
243
+ return;
244
+
247245 omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff);
248246 if (omap_spi1.dev.platform_data)
249247 platform_device_register(&omap_spi1);
....@@ -258,48 +256,6 @@
258256 {
259257 }
260258 #endif
261
-
262
-
263
-#define OMAP1_CAMERA_BASE 0xfffb6800
264
-#define OMAP1_CAMERA_IOSIZE 0x1c
265
-
266
-static struct resource omap1_camera_resources[] = {
267
- [0] = {
268
- .start = OMAP1_CAMERA_BASE,
269
- .end = OMAP1_CAMERA_BASE + OMAP1_CAMERA_IOSIZE - 1,
270
- .flags = IORESOURCE_MEM,
271
- },
272
- [1] = {
273
- .start = INT_CAMERA,
274
- .flags = IORESOURCE_IRQ,
275
- },
276
-};
277
-
278
-static u64 omap1_camera_dma_mask = DMA_BIT_MASK(32);
279
-
280
-static struct platform_device omap1_camera_device = {
281
- .name = "omap1-camera",
282
- .id = 0, /* This is used to put cameras on this interface */
283
- .dev = {
284
- .dma_mask = &omap1_camera_dma_mask,
285
- .coherent_dma_mask = DMA_BIT_MASK(32),
286
- },
287
- .num_resources = ARRAY_SIZE(omap1_camera_resources),
288
- .resource = omap1_camera_resources,
289
-};
290
-
291
-void __init omap1_camera_init(void *info)
292
-{
293
- struct platform_device *dev = &omap1_camera_device;
294
- int ret;
295
-
296
- dev->dev.platform_data = info;
297
-
298
- ret = platform_device_register(dev);
299
- if (ret)
300
- dev_err(&dev->dev, "unable to register device: %d\n", ret);
301
-}
302
-
303259
304260 /*-------------------------------------------------------------------------*/
305261