2010-08-13 14:46:38 +03:00
|
|
|
/*
|
2010-10-21 16:03:42 +03:00
|
|
|
* f32x/c2-om.c - Basic C2 messages, driver for Openmoko GTA01/GTA02+DebugV3
|
2010-08-13 14:46:38 +03:00
|
|
|
*
|
2010-10-21 16:03:42 +03:00
|
|
|
* Written 2008, 2010 by Werner Almesberger
|
|
|
|
* Copyright 2008, 2010 Werner Almesberger
|
2010-08-13 14:46:38 +03:00
|
|
|
*
|
|
|
|
* 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 <stdint.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2010-10-22 00:26:43 +03:00
|
|
|
#include "gpio-s3c24xx.h"
|
2010-10-21 16:03:42 +03:00
|
|
|
#include "c2-drv.h"
|
2010-08-13 14:46:38 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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 */
|
|
|
|
|
|
|
|
|
2010-10-22 01:09:43 +03:00
|
|
|
#include "c2-bitbang.c"
|
2010-10-21 16:03:42 +03:00
|
|
|
|
|
|
|
|
|
|
|
/* ----- Operations -------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
|
|
struct c2_ops c2_om = {
|
2010-10-22 01:09:43 +03:00
|
|
|
.init = c2_init,
|
|
|
|
.reset = c2_reset,
|
|
|
|
.addr_write = c2_addr_write,
|
|
|
|
.addr_read = c2_addr_read,
|
|
|
|
.data_write = c2_data_write,
|
|
|
|
.data_read = c2_data_read,
|
2010-10-21 16:03:42 +03:00
|
|
|
};
|