Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 1 | /* arch/arm/mach-s3c2410/include/mach/spi.h |
| 2 | * |
| 3 | * Copyright (c) 2006 Simtec Electronics |
| 4 | * Ben Dooks <ben@simtec.co.uk> |
| 5 | * |
| 6 | * S3C2410 - SPI Controller platform_device info |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
| 11 | */ |
| 12 | |
| 13 | #ifndef __ASM_ARCH_SPI_H |
| 14 | #define __ASM_ARCH_SPI_H __FILE__ |
| 15 | |
| 16 | struct s3c2410_spi_info { |
Ben Dooks | ee9c1fb | 2009-01-06 14:41:44 -0800 | [diff] [blame] | 17 | int pin_cs; /* simple gpio cs */ |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 18 | unsigned int num_cs; /* total chipselects */ |
| 19 | int bus_num; /* bus number to use. */ |
| 20 | |
Ben Dooks | bec0806 | 2009-12-14 22:20:24 -0800 | [diff] [blame^] | 21 | unsigned int use_fiq:1; /* use fiq */ |
| 22 | |
Ben Dooks | cf46b97 | 2008-10-15 22:02:41 -0700 | [diff] [blame] | 23 | void (*gpio_setup)(struct s3c2410_spi_info *spi, int enable); |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 24 | void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol); |
| 25 | }; |
| 26 | |
Ben Dooks | b2a6cf3 | 2008-10-21 14:06:20 +0100 | [diff] [blame] | 27 | /* Standard setup / suspend routines for SPI GPIO pins. */ |
| 28 | |
| 29 | extern void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi, |
| 30 | int enable); |
| 31 | |
| 32 | extern void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi, |
| 33 | int enable); |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 34 | |
Ben Dooks | a2c195f | 2009-08-03 17:26:50 +0100 | [diff] [blame] | 35 | extern void s3c24xx_spi_gpiocfg_bus1_gpd8_9_10(struct s3c2410_spi_info *spi, |
| 36 | int enable); |
| 37 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 38 | #endif /* __ASM_ARCH_SPI_H */ |