C8051F32x firmware infrastructure

Sign in or create your account | Project List | Help

C8051F32x firmware infrastructure Git Source Tree

Root/f32x/c2-om.c

1/*
2 * f32x/c2-om.c - Basic C2 messages, driver for Openmoko GTA01/GTA02+DebugV3
3 *
4 * Written 2008, 2010 by Werner Almesberger
5 * Copyright 2008, 2010 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#include "gpio-s3c24xx.h"
15#include "c2-drv.h"
16
17
18/*
19 * SPI GPIOs are the same on 2410 and 2442, so this should work on GTA01 and
20 * on GTA02.
21 */
22
23#define C2CK 4, 11 /* E13 = SPI_MISO0 */
24#define C2D 4, 13 /* E12 = SPI_CLK0 */
25
26
27#include "c2-bitbang.c"
28
29
30static void om_init(int power)
31{
32    gpio_init();
33    c2_init();
34}
35
36
37struct c2_ops c2_om = {
38    .init = om_init,
39    .reset = c2_reset,
40    .addr_write = c2_addr_write,
41    .addr_read = c2_addr_read,
42    .data_write = c2_data_write,
43    .data_read = c2_data_read,
44};
45

Archive Download this file

Branches:
master



interactive