mirror of
git://projects.qi-hardware.com/f32xbase.git
synced 2024-11-04 23:21:53 +02:00
80a0152663
- f32x/c2-om.c: moved system includes to c2-bitbang.c - f32x/c2-bitbang.c (c2_init): leave it to the upper layer to call gpio_init - f32x/c2-om.c (om_init): call gpio_init, then c2_init
45 lines
926 B
C
45 lines
926 B
C
/*
|
|
* 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(void)
|
|
{
|
|
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,
|
|
};
|