14 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
16 #include <linux/kernel.h>
24 #include <linux/i2c.h>
32 #include <mach/hardware.h>
47 #define VISION_PHYS_BASE EP93XX_CS7_PHYS_BASE
48 #define VISION_VIRT_BASE 0xfebff000
59 static void __init vision_map_io(
void)
76 #define VISION_LCD_ENABLE EP93XX_GPIO_LINE_EGPIO1
83 dev_name(&pdev->
dev));
99 static void vision_lcd_blank(
int blank_mode,
struct fb_info *
info)
111 .setup = vision_lcd_setup,
112 .teardown = vision_lcd_teardown,
113 .blank = vision_lcd_blank,
120 #define PCA9539_74_GPIO_BASE (EP93XX_GPIO_LINE_MAX + 1)
121 #define PCA9539_75_GPIO_BASE (PCA9539_74_GPIO_BASE + 16)
122 #define PCA9539_76_GPIO_BASE (PCA9539_75_GPIO_BASE + 16)
123 #define PCA9539_77_GPIO_BASE (PCA9539_76_GPIO_BASE + 16)
159 .platform_data = &pca953x_74_gpio_data,
162 .platform_data = &pca953x_75_gpio_data,
165 .platform_data = &pca953x_76_gpio_data,
168 .platform_data = &pca953x_77_gpio_data,
175 #define VISION_SPI_FLASH_CS EP93XX_GPIO_LINE_EGPIO7
177 static struct mtd_partition vision_spi_flash_partitions[] = {
179 .name =
"SPI bootstrap",
183 .name =
"Bootstrap config",
187 .name =
"System config",
195 .parts = vision_spi_flash_partitions,
196 .nr_parts =
ARRAY_SIZE(vision_spi_flash_partitions),
205 static void vision_spi_flash_hw_cleanup(
struct spi_device *
spi)
216 .setup = vision_spi_flash_hw_setup,
217 .cleanup = vision_spi_flash_hw_cleanup,
218 .cs_control = vision_spi_flash_hw_cs_control,
224 #define VISION_SPI_MMC_CS EP93XX_GPIO_LINE_G(2)
225 #define VISION_SPI_MMC_WP EP93XX_GPIO_LINE_F(0)
226 #define VISION_SPI_MMC_CD EP93XX_GPIO_LINE_EGPIO15
228 static struct gpio vision_spi_mmc_gpios[] = {
233 static int vision_spi_mmc_init(
struct device *pdev,
260 static void vision_spi_mmc_exit(
struct device *pdev,
void *pdata)
266 static int vision_spi_mmc_get_ro(
struct device *pdev)
271 static int vision_spi_mmc_get_cd(
struct device *pdev)
277 .init = vision_spi_mmc_init,
278 .exit = vision_spi_mmc_exit,
279 .get_ro = vision_spi_mmc_get_ro,
280 .get_cd = vision_spi_mmc_get_cd,
282 .powerup_msecs = 100,
292 static void vision_spi_mmc_hw_cleanup(
struct spi_device *
spi)
303 .setup = vision_spi_mmc_hw_setup,
304 .cleanup = vision_spi_mmc_hw_cleanup,
305 .cs_control = vision_spi_mmc_hw_cs_control,
311 static struct spi_board_info vision_spi_board_info[] __initdata = {
313 .modalias =
"sst25l",
315 .controller_data = &vision_spi_flash_hw,
316 .max_speed_hz = 20000000,
321 .modalias =
"mmc_spi",
322 .platform_data = &vision_spi_mmc_data,
323 .controller_data = &vision_spi_mmc_hw,
324 .max_speed_hz = 20000000,
332 .num_chipselect =
ARRAY_SIZE(vision_spi_board_info),
338 static void __init vision_init_machine(
void)
352 pr_warn(
"cannot request interrupt gpio for pca9539:74\n");
362 MACHINE_START(VISION_EP9307,
"Vision Engraving Systems EP9307")
364 .atag_offset = 0x100,
365 .map_io = vision_map_io,
369 .init_machine = vision_init_machine,