MIPS: Audit and remove any unnecessary uses of module.h
[linux-2.6/btrfs-unstable.git] / arch / mips / bcm63xx / dev-hsspi.c
blob696abc48e3c8b81aee74336f0d0019058fa2445a
1 /*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
6 * Copyright (C) 2012 Jonas Gorski <jonas.gorski@gmail.com>
7 */
9 #include <linux/init.h>
10 #include <linux/kernel.h>
11 #include <linux/platform_device.h>
13 #include <bcm63xx_cpu.h>
14 #include <bcm63xx_dev_hsspi.h>
15 #include <bcm63xx_regs.h>
17 static struct resource spi_resources[] = {
19 .start = -1, /* filled at runtime */
20 .end = -1, /* filled at runtime */
21 .flags = IORESOURCE_MEM,
24 .start = -1, /* filled at runtime */
25 .flags = IORESOURCE_IRQ,
29 static struct platform_device bcm63xx_hsspi_device = {
30 .name = "bcm63xx-hsspi",
31 .id = 0,
32 .num_resources = ARRAY_SIZE(spi_resources),
33 .resource = spi_resources,
36 int __init bcm63xx_hsspi_register(void)
38 if (!BCMCPU_IS_6328() && !BCMCPU_IS_6362())
39 return -ENODEV;
41 spi_resources[0].start = bcm63xx_regset_address(RSET_HSSPI);
42 spi_resources[0].end = spi_resources[0].start;
43 spi_resources[0].end += RSET_HSSPI_SIZE - 1;
44 spi_resources[1].start = bcm63xx_get_irq_number(IRQ_HSSPI);
46 return platform_device_register(&bcm63xx_hsspi_device);