blob: 1d300fb112b170777a0025d85a7faf7e85ad225d [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/* 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
16struct s3c2410_spi_info {
Ben Dooksee9c1fb2009-01-06 14:41:44 -080017 int pin_cs; /* simple gpio cs */
Russell Kinga09e64f2008-08-05 16:14:15 +010018 unsigned int num_cs; /* total chipselects */
19 int bus_num; /* bus number to use. */
20
Ben Dookscf46b972008-10-15 22:02:41 -070021 void (*gpio_setup)(struct s3c2410_spi_info *spi, int enable);
Russell Kinga09e64f2008-08-05 16:14:15 +010022 void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
23};
24
Ben Dooksb2a6cf32008-10-21 14:06:20 +010025/* Standard setup / suspend routines for SPI GPIO pins. */
26
27extern void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi,
28 int enable);
29
30extern void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi,
31 int enable);
Russell Kinga09e64f2008-08-05 16:14:15 +010032
33#endif /* __ASM_ARCH_SPI_H */