summaryrefslogtreecommitdiffstats
path: root/serprog.c
blob: 3a105c8bb44bf404612c4faa9c62cef6d249e1c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
 * This file is part of the flashrom project.
 *
 * Copyright (C) 2009 Urja Rannikko <urjaman@gmail.com>
 * Copyright (C) 2009 Carl-Daniel Hailfinger
 *
 * 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.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 */

#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <inttypes.h>
#include <termios.h>
#include "flash.h"

char *serprog_param = NULL;

#define SERPROG_SUPPORT 0
#if SERPROG_SUPPORT == 1
#else
int serprog_init(void)
{
	fprintf(stderr, "Serial programmer support was not compiled in\n");
	exit(1);
}

int serprog_shutdown(void)
{
	fprintf(stderr, "Serial programmer support was not compiled in\n");
	exit(1);
}

void serprog_chip_writeb(uint8_t val, chipaddr addr)
{
	fprintf(stderr, "Serial programmer support was not compiled in\n");
	exit(1);
}

uint8_t serprog_chip_readb(const chipaddr addr)
{
	fprintf(stderr, "Serial programmer support was not compiled in\n");
	exit(1);
}

void serprog_chip_readn(uint8_t *buf, const chipaddr addr, size_t len)
{
	fprintf(stderr, "Serial programmer support was not compiled in\n");
	exit(1);
}

void serprog_delay(int delay)
{
	fprintf(stderr, "Serial programmer support was not compiled in\n");
	exit(1);
}
#endif
OpenPOWER on IntegriCloud