| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/arch/arm/mach-omap1/devices.c |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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. |
|---|
| 10 | 6 | */ |
|---|
| 11 | 7 | |
|---|
| 12 | 8 | #include <linux/dma-mapping.h> |
|---|
| .. | .. |
|---|
| 25 | 21 | #include <mach/mux.h> |
|---|
| 26 | 22 | |
|---|
| 27 | 23 | #include <mach/omap7xx.h> |
|---|
| 28 | | -#include "camera.h" |
|---|
| 29 | 24 | #include <mach/hardware.h> |
|---|
| 30 | 25 | |
|---|
| 31 | 26 | #include "common.h" |
|---|
| .. | .. |
|---|
| 244 | 239 | |
|---|
| 245 | 240 | static void omap_init_spi100k(void) |
|---|
| 246 | 241 | { |
|---|
| 242 | + if (!cpu_is_omap7xx()) |
|---|
| 243 | + return; |
|---|
| 244 | + |
|---|
| 247 | 245 | omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff); |
|---|
| 248 | 246 | if (omap_spi1.dev.platform_data) |
|---|
| 249 | 247 | platform_device_register(&omap_spi1); |
|---|
| .. | .. |
|---|
| 258 | 256 | { |
|---|
| 259 | 257 | } |
|---|
| 260 | 258 | #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 | | - |
|---|
| 303 | 259 | |
|---|
| 304 | 260 | /*-------------------------------------------------------------------------*/ |
|---|
| 305 | 261 | |
|---|