1
0
mirror of git://projects.qi-hardware.com/f32xbase.git synced 2024-11-23 22:35:20 +02:00
f32xbase/f32x/c2-om.c

45 lines
931 B
C
Raw Permalink Normal View History

/*
* f32x/c2-om.c - Basic C2 messages, driver for Openmoko GTA01/GTA02+DebugV3
*
* Written 2008, 2010 by Werner Almesberger
* Copyright 2008, 2010 Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include "gpio-s3c24xx.h"
#include "c2-drv.h"
/*
* SPI GPIOs are the same on 2410 and 2442, so this should work on GTA01 and
* on GTA02.
*/
#define C2CK 4, 11 /* E13 = SPI_MISO0 */
#define C2D 4, 13 /* E12 = SPI_CLK0 */
#include "c2-bitbang.c"
static void om_init(int power)
{
gpio_init();
c2_init();
}
struct c2_ops c2_om = {
.init = om_init,
.reset = c2_reset,
.addr_write = c2_addr_write,
.addr_read = c2_addr_read,
.data_write = c2_data_write,
.data_read = c2_data_read,
};